Re: `pci_apply_final_quirks()` taking half a second
From: David Woodhouse
Date: Sat Apr 08 2017 - 13:00:52 EST
On Sat, 2017-04-08 at 10:41 -0500, Bjorn Helgaas wrote:
>
> > Measuring where time is spent during boot with `systemd-bootchart`
> > on an Asus A780FullHD, it turns out that half a second is spent in
> > `pci_apply_final_quirks()`.
>
> I agree, that seems like a crazy amount of time.
>
> Can you figure out how to turn on pr_debug() (via the dynamic debug
> mess or whatever) and boot with "initcall_debug"? That should tell us
> how long each quirk took.
It could well be spending a fair amount of time just attempting to
match each device against the list. When I first implemented the table-
based quirks, back in the mists of time, there were relatively few.Â
Now I wonder if it's worth sorting the list by vendor ID or something,
at least for the common case of the quirks which match on
vendor/device.
I note it's also reading PCI_CACHE_LINE_SIZE From config space for each
device in pci_apply_final_quirks(). How long does that take?Attachment:
smime.p7s
Description: S/MIME cryptographic signature