lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Jul 2008 19:25:16 +0100
From:	Simon Arlott <simon@...e.lp0.eu>
To:	Alan Stern <stern@...land.harvard.edu>
CC:	Rene Herman <rene.herman@...access.nl>,
	Arjan van de Ven <arjan@...radead.org>,
	linux-kernel@...r.kernel.org, mingo@...e.hu,
	Daniel Walker <dwalker@...sta.com>,
	USB list <linux-usb@...r.kernel.org>
Subject: Re: [patch 5/3] fastboot: sync the async execution before late_initcall
 and move level 6s (sync) first

On 30/07/08 15:08, Alan Stern wrote:
> On Tue, 29 Jul 2008, Simon Arlott wrote:
> 
>> It doesn't appear to be possible to init multiple PCI devices at once... 
>> I haven't looked into what is doing it exactly but presumably there's a 
>> lock being held over the whole device probe process.
>> 
>> The speedup from usb seems to be primarily from initialising devices in 
>> the background... perhaps there's some way to do that without doing hcd 
>> init from a second thread?
> 
> You could provide useful details by booting a kernel with
> CONFIG_USB_DEBUG enabled.
> 
> The USB stack _already_ initializes USB devices (i.e., not host
> controllers) in a separate thread.

With fastboot:
162 ohci_hcd_mod_init+0x0/0xa6
167 pcie_portdrv_init+0x0/0x4d
182 saa7134_init+0x0/0x4a
205 ehci_hcd_init+0x0/0x8b
299 snd_usb_audio_init+0x0/0x3d
557 e1000_init_module+0x0/0x88
1227 amd74xx_ide_init+0x0/0x1b
2306 nv_init+0x0/0x1b

Without fastboot:
103 ehci_hcd_init+0x0/0x8b
113 raid5_init+0x0/0x3e
127 pci_iommu_init+0x0/0x17
148 ohci_hcd_mod_init+0x0/0xa4
183 saa7134_init+0x0/0x4a
297 snd_usb_audio_init+0x0/0x3d
557 e1000_init_module+0x0/0x88
1227 amd74xx_ide_init+0x0/0x1b
2303 nv_init+0x0/0x1b
2859 usblp_init+0x0/0x1b

Boot log attached.

It looks like usb device driver init requires it to immediately block and 
wait for all devices to have completed init - so regardless of where we 
put the usb/ directory in the initcall order, it will always wait a while 
because the drivers will be immediately after the hcd init... perhaps 
if we moved the hcd init to before net/, sata/, ide/ etc. (all the things 
that take time themselves) but left usb device drivers to the end it 
would actually get the benefit of that separate thread.

I don't have the time to rework how usb/ is linked in order to try that, 
but moving usb/ to before net/ and sata/ while making all the usb device 
drivers that get used be late initcalls could be used to test it.

-- 
Simon Arlott

Download attachment "dmesg-net-sata-usb-nfe0.bz2" of type "application/x-bzip" (25136 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ