Slow X startup and Hammering /proc/pci

Phillip Ezolt phillipezolt at gmail.com
Thu Jun 1 10:54:14 PDT 2006


Hi,

    I've been investigating gnome startup time for the summer of
code, and I've noticed that the startup time for X is on the order of
4 seconds. That seems very slow.

You can easily reproduce this by running xinit, and only starting
xdpyinfo.  Time how long this takes to start and shutdown.  I'd had 3
reports of this taking 3-4 seconds.  NOTE: All my measurements are on a warm
disk
cache.

HOWTO reproduce:
time xinit /usr/bin/xdpyinfo -- /usr/bin/X :0
real    0m4.119s
user    0m0.932s
sys     0m0.344s
[root at localhost ~]#


Data:
----

Wall
Time            CPU          GPU           SW
3-4s    AMD Turion64 ML-34 (1.8GHz)  Radeon XPRESS 200M 5955 (PCIE)   FC5
Xorg 7.0 (opensource ATI driver)
4.023s  AMD Sempron 2200+            Radeon 9250
3.801s  AMD Athlon XP 2200+          Radeon 9700 Pro                  Gentoo
XOrg 7.0-r1, ATI drivers 8.23.7 ,
2.2s    AMD Athlon 64 3200+          Geforce4 440 Go 64M              FC5
xorg-x11-server-Xorg-1.0.1-9.fc5.1.1 ("nv" driver xorg-x11-nv-1.0.1.5-3.1 )


...


I've done a little investigation, and it looks like the PCI probe code
is going a little crazy.  I've straced the startup sequence for X.

Problems:
1) The X server explores all sorts of PCI devices that don't exist.

Here's a sample:

stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/01.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/02.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/02.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/03.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/03.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/04.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/04.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/proc/bus/pci/00", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/pci/00/05.0", O_RDONLY) = 6

...

This happens over 8 thousand times:

[root at localhost ~]# grep open x_strace | grep ENOENT | grep "/proc/bus/pci"
| wc
8353   83530  709040


2) The code also opens "/proc/bus/pci/devices" again and again.

[root at localhost ~]# grep open x_strace | grep "/proc/bus/pci/devices" | wc
    178     712    7832

...

Software:
FC5
xorg-x11-drv-ati-6.5.7.3-4
xorg-x11-server-Xorg-1.0.1-9.fc5.1.1

Hardware:
01:05.0 VGA compatible controller: ATI Technologies Inc ATI Radeon XPRESS
200M 5955 (PCIE)


Any ideas on how to fix this?

--Phil
SoC blog:  http://ezolt.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20060601/cc3d2a9f/attachment.html>


More information about the xorg mailing list