public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Arlott <simon@fire.lp0.eu>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Rene Herman <rene.herman@keyaccess.nl>,
	Arjan van de Ven <arjan@infradead.org>,
	linux-kernel@vger.kernel.org, mingo@elte.hu,
	Daniel Walker <dwalker@mvista.com>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: [patch 5/3] fastboot: sync the async execution before late_initcall and move level 6s (sync) first
Date: Wed, 30 Jul 2008 19:25:16 +0100	[thread overview]
Message-ID: <4890B20C.7060308@simon.arlott.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0807301006560.2584-100000@iolanthe.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]

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

[-- Attachment #2: dmesg-net-sata-usb-nfe0.bz2 --]
[-- Type: application/x-bzip, Size: 25136 bytes --]

  reply	other threads:[~2008-07-30 18:25 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20 15:59 [patch 4/3] fastboot: hold the BKL over the async init call sequence Arjan van de Ven
2008-07-20 16:00 ` [patch 5/3] fastboot: sync the async execution before late_initcall and move level 6s (sync) first Arjan van de Ven
2008-07-20 16:40   ` Ingo Molnar
2008-07-20 21:14   ` Daniel Walker
2008-07-20 21:23     ` Simon Arlott
2008-07-20 21:50     ` Arjan van de Ven
2008-07-29 21:00   ` Rene Herman
2008-07-29 21:04     ` Arjan van de Ven
2008-07-29 21:12       ` Rene Herman
2008-07-29 21:21         ` Arjan van de Ven
2008-07-29 22:30           ` Rene Herman
2008-07-29 22:34             ` Simon Arlott
2008-07-30 14:08               ` Alan Stern
2008-07-30 18:25                 ` Simon Arlott [this message]
2008-07-30 19:41                   ` Alan Stern
2008-07-31 11:49                     ` Simon Arlott
2008-07-31 15:34                       ` Alan Stern
2008-07-31 18:29                         ` Simon Arlott
2008-07-31 18:56                           ` Rene Herman
2008-07-31 19:27                             ` Simon Arlott
2008-07-31 19:16                           ` Alan Stern
2008-08-06 18:40                             ` [PATCH RFC] USB: Add HCD fastboot Simon Arlott
2008-08-06 19:11                               ` Alan Stern
2008-08-06 19:20                                 ` Simon Arlott
2008-08-06 19:29                                   ` Greg KH
2008-08-06 19:49                                   ` Alan Stern
2008-08-06 19:56                                     ` Arjan van de Ven
2008-08-06 20:09                                       ` Alan Stern
2008-08-06 20:17                                         ` Arjan van de Ven
2008-08-06 20:27                                           ` Alan Stern
2008-08-06 20:07                                     ` Simon Arlott
2008-08-06 20:26                                       ` Alan Stern
2008-08-06 21:49                                         ` Simon Arlott
2008-08-06 22:34                                           ` Alan Stern
2008-08-06 22:53                                             ` Simon Arlott
2008-08-07 14:14                                               ` Alan Stern
2008-08-07  3:29                                             ` David Brownell
2008-08-07  9:28                                           ` Emanoil Kotsev
2008-08-07 16:47                                             ` Alan Stern
2008-08-07  3:34                               ` David Brownell
2008-08-08  9:24                               ` Rene Herman
2008-08-08 11:29                                 ` Simon Arlott
2008-08-08 14:30                                   ` Rene Herman
2008-07-31 21:56                           ` [patch 5/3] fastboot: sync the async execution before late_initcall and move level 6s (sync) first Greg KH
2008-07-31 22:12                             ` Simon Arlott
2008-07-31 22:37                               ` Simon Arlott
2008-09-16 22:19                             ` Tim Bird

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4890B20C.7060308@simon.arlott.org.uk \
    --to=simon@fire.lp0.eu \
    --cc=arjan@infradead.org \
    --cc=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rene.herman@keyaccess.nl \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox