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

Richard Barnette jrbarnette at chromium.org
Tue Jun 8 15:47:42 PDT 2010


On Jun 8, 2010, at 2:45 PM, Julien Cristau wrote:
[ ... ]
>> I'd like fix this with a patch to X upstream, so that the change  
>> doesn't
>> have to be maintained as part of the Chromium OS sources.  For a  
>> first
>> cut, I can think of three obvious approaches:
>>  * Change xorg-server to simply drop the calls to get the vendor and
>>    device names.
>>  * A build or configure option in libpciaccess that disables the
>> library
>>    routines (i.e. forces them to return NULL in all cases).
>
> Can't you already configure libpciaccess with
> --with-pciids-path=/nonexistent?
>
Yes, solves the performance issue; I'd already considered this.   
However,
it means we have to build Chromium OS with X deliberately sabotaged,
and so we have to maintain a local change (with comments explaining
why) to make sure the images stay sabotaged.  It's exactly this kind
of maintenance hazard I'd like to avoid.

Thanks!

>>  * A runtime option to the X server that allows specifying the path  
>> to
>>    the "pci.ids.gz" or "pci.ids" file.  Chromium OS could specify /
>> dev/null
>>    to get the desired time savings.  (This would mean touching both
>>    xorg-server and libpciaccess).
>>
>> I'd like advice/opinions on which of these might be the most eagerly
>> embraced (or at any rate, least vigorously opposed :-) ), or whether
>> there's a better idea I've overlooked.
>>
> Making these functions faster would seem like the best option, if at  
> all
> possible...
>
> Cheers,
> Julien

-- jrb



More information about the xorg-devel mailing list