Re: Re: USB start-up time

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

 



Hi Greg,

thanks for the quick reply.

> > we are working on making the Linux Kernel (2.6.34) boot faster on an 
> > embedded ARM machine. One significant delay is caused by the 50ms 
> > TDRSTR minimum reset time required by USB spec. Starting both OHCI 
> > and EHCI creates a 100ms sleep in total. Running them in threads e.g. 
> > with
> > 
> > http://lwn.net/Articles/299591/
> > 
> > removes the delay but could cause other issues. We need both compiled 
> > in and can not run them as modules. Is there any other recommended 
> > procedure to increase start-up time?
> 
> Yes, do like other "sane" distros do and don't stop the rest of the
> system from coming up when you are waiting for USB to get initialized :)
> 
> Seriously, this should not be an issue at all, why are you forcing your
> boot sequence to wait until after this is finished?  Your system should
> be off doing other things at this point in time while those delays
> happen, right?

Do you mean we should have USB EHCI/OHCI in modules? That is not an option 
as said above.

Some more details:

The 50ms delay we talk about here is caused by msleep() in the 
(ECHI-/OHCI-) driver initializations. These are called while the kernel 
starts, even before the root file system is mounted. Using a HW trace 
and initcall debug [1] we can see that while in this msleep() nothing is 
executed in parallel. The system is just idling at this time (during 
kernel start). In sum this results in > 100ms delay until the root file 
system is mounted due to the consecutive start of EHCI + OHCI (both 
msleeping ~50ms).

Using Arjan's patches

http://lwn.net/Articles/299591/
esp. "fastboot: turn the USB hostcontroller initcalls into async initcalls"

the boot time is improved by these > 100ms. If we understand correctly, 
they let the USB init (and with this the msleep()) be executed with the 
rest of the kernel initialization in parallel, avoiding the kernel to 
idle while msleeping in the USB init.

Thanks,
Martin

[1] Using initcall debug http://elinux.org/Initcall_Debug :

58461 usecs [    0.710000] initcall ohci_hcd_mod_init+0x0/0x6c returned 0
50882 usecs [    0.650000] initcall ehci_hcd_init+0x0/0x94 returned 0
36067 usecs [    0.520000] initcall tty_init+0x0/0x100 returned 0
23210 usecs [    0.580000] initcall brd_init+0x0/0x19c returned 0
20947 usecs [    0.540000] initcall pty_init+0x0/0x424 returned 0
20701 usecs [    0.460000] initcall aio_setup+0x0/0xb4 returned 0
...

--
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