Re: Improve `ohci_pci_init()` time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 02, 2017 at 02:17:42PM +0200, Paul Menzel wrote:
> Dear Linux folks,
> 
> 
> Trying to improve the start-up time of a (slow) ASRock E350M1 which already
> uses coreboot, when instrumenting the time of the Linux Kernel, execution of
> `ohci_pci_init()` takes almost 200 ms.
> 
> ```
> […]
> > [    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.13.0-rc3+ root=UUID=128529e0-b8bb-4c7d-956d-ddf699036c8c ro noisapnp initcall_debug log_buf_len=32M trace_buf_size=128M trace_clock=global trace_options=nooverwrite,funcgraph-abstime,funcgraph-cpu,funcgraph-duration,funcgraph-proc,funcgraph-tail,nofuncgraph-overhead,context-info,graph-time ftrace=function_graph ftrace_graph_max_depth=2 ftrace_graph_filter=do_one_initcall
> […]
> [    2.181189] calling  ohci_pci_init+0x0/0x1000 [ohci_pci] @ 168
> [    2.181268] ohci-pci: OHCI PCI platform driver
> [    2.182058] ohci-pci 0000:00:12.0: OHCI PCI host controller
> [    2.182135] ohci-pci 0000:00:12.0: new USB bus registered, assigned bus
> number 3
> [    2.182290] ohci-pci 0000:00:12.0: irq 18, io mem 0xf0148000
> [    2.244664] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
> [    2.244809] usb usb3: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1
> [    2.244879] usb usb3: Product: OHCI PCI host controller
> [    2.244939] usb usb3: Manufacturer: Linux 4.13.0-rc3+ ohci_hcd
> [    2.244999] usb usb3: SerialNumber: 0000:00:12.0
> [    2.245486] hub 3-0:1.0: USB hub found
> [    2.245637] hub 3-0:1.0: 5 ports detected
> [    2.252384] ohci-pci 0000:00:13.0: OHCI PCI host controller
> [    2.252484] ohci-pci 0000:00:13.0: new USB bus registered, assigned bus
> number 4
> [    2.252634] ohci-pci 0000:00:13.0: irq 18, io mem 0xf0149000
> [    2.316458] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
> [    2.316604] usb usb4: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1
> [    2.316675] usb usb4: Product: OHCI PCI host controller
> [    2.316733] usb usb4: Manufacturer: Linux 4.13.0-rc3+ ohci_hcd
> [    2.316793] usb usb4: SerialNumber: 0000:00:13.0
> [    2.317666] hub 4-0:1.0: USB hub found
> [    2.317830] hub 4-0:1.0: 5 ports detected
> [    2.319124] ohci-pci 0000:00:14.5: OHCI PCI host controller
> [    2.319199] ohci-pci 0000:00:14.5: new USB bus registered, assigned bus
> number 5
> [    2.319341] ohci-pci 0000:00:14.5: irq 18, io mem 0xf014a000
> [    2.380239] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
> [    2.380383] usb usb5: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1
> [    2.380453] usb usb5: Product: OHCI PCI host controller
> [    2.380512] usb usb5: Manufacturer: Linux 4.13.0-rc3+ ohci_hcd
> [    2.380571] usb usb5: SerialNumber: 0000:00:14.5
> [    2.381189] hub 5-0:1.0: USB hub found
> [    2.382135] hub 5-0:1.0: 2 ports detected
> [    2.382766] initcall ohci_pci_init+0x0/0x1000 [ohci_pci] returned 0 after
> 196766 usecs
> […]
> ```
> 
> It looks like this is not done in parallel, so all the next “tasks” have to
> wait until `ohci_pci_init()` is done.
> 
> Do you know of a way to redcuce that time? Please find all the Linux
> messages attached.

As USB is async for device discovery, this shouldn't be keeping your
boot process from continuing on, right?  If you have this as a kernel
module and load it later, it should be fine.

That being said, look in the driver itself to see what is taking a
while, some devices are just slow to initialize themselves for various
reasons that all are due to the hardware design :(

good luck!

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux