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

2010-06-26 Thread olafBuddenhagen
Hi, On Tue, Jun 22, 2010 at 04:44:50PM +0200, Mark Kettenis wrote: I don't think using system(3) would be a good idea, since it has some nasty side-effects. That's how UNIX works. If it has nasty side-effects, then something else is broken. Also, this probably wouldn't work on OpenBSD where

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

2010-06-22 Thread Mark Kettenis
Date: Wed, 09 Jun 2010 06:46:52 -0700 From: Alan Coopersmith alan.coopersm...@oracle.com Daniel Stone wrote: On Tue, Jun 08, 2010 at 09:40:55PM -0400, Matt Turner wrote: On Tue, Jun 8, 2010 at 9:35 PM, Richard Barnette jrbarne...@chromium.org wrote: Still, cost/benefit matters here:

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

2010-06-09 Thread Daniel Stone
On Tue, Jun 08, 2010 at 09:40:55PM -0400, Matt Turner wrote: On Tue, Jun 8, 2010 at 9:35 PM, Richard Barnette jrbarne...@chromium.org wrote: Still, cost/benefit matters here:  Essentially, the justification for all this work is a debug feature (being able to print the information in the

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

2010-06-09 Thread James Cloos
MG == Mikhail Gusarov dotted...@dottedmag.net writes: MG Oh, that's _the_ right question. Looks like only for writing names to MG log (unless I missed some access to the data structure while MG grepping). Well, not really useful to trade for 400ms of startup :) That info should remain available

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

2010-06-09 Thread Kristian Høgsberg
On Wed, Jun 9, 2010 at 7:23 AM, Daniel Stone dan...@fooishbar.org wrote: On Tue, Jun 08, 2010 at 09:40:55PM -0400, Matt Turner wrote: On Tue, Jun 8, 2010 at 9:35 PM, Richard Barnette jrbarne...@chromium.org wrote: Still, cost/benefit matters here:  Essentially, the justification for all

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

2010-06-09 Thread Alan Coopersmith
Daniel Stone wrote: On Tue, Jun 08, 2010 at 09:40:55PM -0400, Matt Turner wrote: On Tue, Jun 8, 2010 at 9:35 PM, Richard Barnette jrbarne...@chromium.org wrote: Still, cost/benefit matters here: Essentially, the justification for all this work is a debug feature (being able to print the

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

2010-06-09 Thread James Cloos
JC == James Cloos cl...@jhcloos.com writes: MG == Mikhail Gusarov dotted...@dottedmag.net writes: MG Oh, that's _the_ right question. Looks like only for writing names to MG log (unless I missed some access to the data structure while MG grepping). Well, not really useful to trade for 400ms of

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

2010-06-09 Thread Alex Deucher
2010/6/9 Kristian Høgsberg k...@bitplanet.net: On Wed, Jun 9, 2010 at 7:23 AM, Daniel Stone dan...@fooishbar.org wrote: On Tue, Jun 08, 2010 at 09:40:55PM -0400, Matt Turner wrote: On Tue, Jun 8, 2010 at 9:35 PM, Richard Barnette jrbarne...@chromium.org wrote: Still, cost/benefit matters

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

2010-06-09 Thread Greg KH
On Wed, Jun 09, 2010 at 07:16:48AM -0400, James Cloos wrote: MG == Mikhail Gusarov dotted...@dottedmag.net writes: MG Oh, that's _the_ right question. Looks like only for writing names to MG log (unless I missed some access to the data structure while MG grepping). Well, not really useful

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

2010-06-08 Thread Richard Barnette
In a recent investigation of system boot time for Chromium OS, I discovered that an inordinate amount of time during X server startup was going to processing required for pci_device_get_vendor_name() and pci_device_get_device_name(). The reason is straightforward: these routines operate by

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

2010-06-08 Thread Julien Cristau
On Tue, Jun 8, 2010 at 14:26:32 -0700, Richard Barnette wrote: In a recent investigation of system boot time for Chromium OS, I discovered that an inordinate amount of time during X server startup was going to processing required for pci_device_get_vendor_name() and

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

2010-06-08 Thread Mikhail Gusarov
Twas brillig at 14:26:32 08.06.2010 UTC-07 when jrbarne...@chromium.org did gyre and gimble: RB I'd like advice/opinions on which of these might be the most eagerly RB embraced (or at any rate, least vigorously opposed :-) ), or whether RB there's a better idea I've overlooked. The Right

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

2010-06-08 Thread Mike Travis
Mikhail Gusarov wrote: Twas brillig at 14:26:32 08.06.2010 UTC-07 when jrbarne...@chromium.org did gyre and gimble: RB I'd like advice/opinions on which of these might be the most eagerly RB embraced (or at any rate, least vigorously opposed :-) ), or whether RB there's a better idea I've

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

2010-06-08 Thread Richard Barnette
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

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

2010-06-08 Thread Richard Barnette
On Jun 8, 2010, at 2:47 PM, Mikhail Gusarov wrote: Twas brillig at 14:26:32 08.06.2010 UTC-07 when jrbarne...@chromium.org did gyre and gimble: RB I'd like advice/opinions on which of these might be the most eagerly RB embraced (or at any rate, least vigorously opposed :-) ), or

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

2010-06-08 Thread Richard Barnette
On Jun 8, 2010, at 2:51 PM, Mike Travis wrote: Mikhail Gusarov wrote: Twas brillig at 14:26:32 08.06.2010 UTC-07 when jrbarne...@chromium.org did gyre and gimble: RB I'd like advice/opinions on which of these might be the most eagerly RB embraced (or at any rate, least vigorously opposed

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

2010-06-08 Thread Mikhail Gusarov
Twas brillig at 15:55:59 08.06.2010 UTC-07 when jrbarne...@chromium.org did gyre and gimble: The Right Thing that immediately comes to mind is fixing libpciaccess internals to be able to read data from saner (indexed, string-compressed, with common strings merged for different PCI ids)

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

2010-06-08 Thread Greg KH
On Wed, Jun 09, 2010 at 06:37:43AM +0700, Mikhail Gusarov wrote: RB I've considered this, too. I think it's substantially more work, RB and I'd worry that the cost/benefit ratio wasn't very good. I RB suspect the best way to thread the needle would include fiddling RB with the pciutils

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

2010-06-08 Thread Richard Barnette
On Jun 8, 2010, at 5:04 PM, Greg KH wrote: [ ... ] It's basically the cache discussed in another thread, expanded to contain all entries from pci.ids :) Hence the amount of work should be approximately the same. Ok, I'm coming in late, but why in the world would the x server ever care about

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

2010-06-08 Thread Mikhail Gusarov
Twas brillig at 17:04:59 08.06.2010 UTC-07 when g...@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.

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

2010-06-08 Thread Richard Barnette
On Jun 8, 2010, at 5:22 PM, Mikhail Gusarov wrote: Twas brillig at 17:04:59 08.06.2010 UTC-07 when g...@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

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

2010-06-08 Thread Younes Manton
On Tue, Jun 8, 2010 at 8:38 PM, Richard Barnette jrbarne...@chromium.org wrote: On Jun 8, 2010, at 5:22 PM, Mikhail Gusarov wrote: Twas brillig at 17:04:59 08.06.2010 UTC-07 when g...@kroah.com did gyre and gimble: GK Ok, I'm coming in late, but why in the world would the x server GK ever

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

2010-06-08 Thread Richard Barnette
On Jun 8, 2010, at 5:56 PM, Younes Manton wrote: [ ... ] 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

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

2010-06-08 Thread Pat Kane
On Tue, Jun 8, 2010 at 8:40 PM, Matt Turner matts...@gmail.com wrote: The output of `lspci -vv` is already a nearly required piece of any bug report, so I don't think we're losing anything here. I agree. I have debugged several PCI card problems over the years and I have always needed to