performance of pci_device_get_{vendor, device}_name() in X server startup

Richard Barnette jrbarnette at chromium.org
Tue Jun 8 17:38:13 PDT 2010


On Jun 8, 2010, at 5:22 PM, Mikhail Gusarov wrote:

>
> Twas brillig at 17:04:59 08.06.2010 UTC-07 when greg at kroah.com did  
> gyre and gimble:
>
> GK> Ok, I'm coming in late, but why in the world would the x server
> GK> ever care about the pci.ids file?  Why would the mapping from id  
> to
> GK> string be needed anywhere here?
>
> Oh, that's _the_ right question. Looks like only for writing names to
> log (unless I missed some access to the data structure while
> grepping). Well, not really useful to trade for 400ms of startup :)
>
I did a longer search while investigating this earlier:  I'm well
nigh certain that the only way the data can get used is to get written
to the log.  That said, I believe some of the log messages involve
errors, and I'd hate to be the one who made it hard from some poor Joe
to debug why his extra-special X server config wouldn't come up.

One other option I've considered is to only extract the data if the
-verbose option is used.  The problem I see is that while the calls
in xf86pciBus.c lend themselves readily to that solution, the calls
in xf86Configure.c aren't as obviously easy to deal with that way.
I'd be thrilled to be better educated on how all that code works.

Thanks!

> -- 
>  http://fossarchy.blogspot.com/

-- jrb



More information about the xorg-devel mailing list