linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Issue reading /sys/bus/pci/devices/0000:00:07.0/config on Ice Lake and linux >= 5.? <= 4.19
@ 2021-05-20  0:56 Jean Schurger
  0 siblings, 0 replies; only message in thread
From: Jean Schurger @ 2021-05-20  0:56 UTC (permalink / raw)
  To: linux-pci

Hi,

I've got an Dell XPS 9300 (2020) with an up-to-date BIOS.

'lspci' shows that it have the following devices:

...
00:07.0 PCI bridge: Intel Corporation Ice Lake Thunderbolt 3 PCI Express Root Port #0 (rev 03)
00:07.2 PCI bridge: Intel Corporation Ice Lake Thunderbolt 3 PCI Express Root Port #2 (rev 03)
...

Reading /sys/bus/pci/devices/.../config for those two devices takes a lot of time. I mean, seconds:


# strace -r cat /sys/bus/pci/devices/0000:00:07.0/config >/dev/null
[...]
     0.000040 openat(AT_FDCWD, "/sys/bus/pci/devices/0000:00:07.0/config", O_RDONLY) = 3
[...]
     0.000042 read(3, "\206\200\35\212\7\4\20\0\3\0\4\6\0\0\201\0\0\0\0\0\0\0\0\0\0\1+\0PP\0\0"..., 131072) = 64
     1.787499 write(1, "\206\200\35\212\7\4\20\0\3\0\4\6\0\0\201\0\0\0\0\0\0\0\0\0\0\1+\0PP\0\0"..., 64) = 64
[...]


# strace -r cat /sys/bus/pci/devices/0000:00:07.2/config >/dev/null
[...]
    0.000051 openat(AT_FDCWD, "/sys/bus/pci/devices/0000:00:07.2/config", O_RDONLY) = 3
[...]
     0.000051 read(3, "\206\200!\212\7\4\20\0\3\0\4\6\0\0\201\0\0\0\0\0\0\0\0\0\0,V\0``\0\0"..., 131072) = 64
     2.149361 write(1, "\206\200!\212\7\4\20\0\3\0\4\6\0\0\201\0\0\0\0\0\0\0\0\0\0,V\0``\0\0"..., 64) = 64
[...]


Reproducible 100% of time.
Issue is present in kernel 5.?+ (tested on 5.4, 5.10, 5.12) but not in 4.19.
Within the seconds it takes to read the config, the rest of the system is perfectly fine.
No freeze, even not any kernel message.

I discovered that issue because Firefox read every pci devices config at startup and takes a lot of time to start because of those two devices. (Same thing with lspci)
I stripped down the test to the most simple form to reproduce the problem with the 'cat' command.

For information, absolutely nothing is plugged on the thunderbolt ports and the problem exists even if X is not started.

I don't know where to start to dig, I'm not familiar with the PCI system.

Any help would be greatly appreciated,
Kind regards,
Jean









^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-20  0:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  0:56 Issue reading /sys/bus/pci/devices/0000:00:07.0/config on Ice Lake and linux >= 5.? <= 4.19 Jean Schurger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).