Bug 6583 - [PATCH] parse /proc/bus/pci/devices *once*
Summary: [PATCH] parse /proc/bus/pci/devices *once*
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2006-04-13 12:40 UTC by Bill Nottingham
Modified: 2006-06-01 15:30 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch for PCI code (12.57 KB, patch)
2006-04-13 12:41 UTC, Bill Nottingham
no flags Details | Splinter Review

Description Bill Nottingham 2006-04-13 12:40:13 UTC
Against 1.0.99.901.

stracing Xorg on startup showed that it opens /proc/bus/pci/devices
approximately 220 times. This seemed inefficient. Hence, patch.

The attached causes it to just parse it once, and then use that data when it's
asked for.

Also includes a small bit to pull config space from
/sys/bus/pci/devices/XXXX:YY:ZZ.A, which can be separated out (might
need work with domains, but it looked like the previous code wasn't getting that
right either.)

The combined effect of this is to shave about half a second off of X server
startup on my laptop (from 5.2 to 4.7 seconds.)
Comment 1 Bill Nottingham 2006-04-13 12:41:02 UTC
Created attachment 5288 [details] [review]
patch for PCI code
Comment 2 Erik Andren 2006-04-18 05:01:27 UTC
Adding patch keyword
Comment 3 Daniel Stone 2006-06-01 15:30:55 UTC
committed to HEAD


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.