Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Arjan van de Ven <arjan@...>
Cc: <linux-kernel@...>, <mingo@...>, Pavel Machek <pavel@...>, Rafael J. Wysocki <rjw@...>
Date: Sunday, July 20, 2008 - 3:23 am

On 19-07-08 17:44, Arjan van de Ven wrote:



Yes, I see. Unfortunately, WITH your patches, driver_probe_done() would 
also no longer be safe when run from a late_initcall() it would appear.

driver_probe_done() tests a variable that's incremented just before the 
driver model calls into the driver .probe method and decremented on 
return from it (really_probe).

However, if the entire module_init() is async the probing may not even 
have _started_ yet let alone finished. Let's take ehci_hcd_init() as an 
example both since you changed that one and since it'll fairly often be 
en route to mass storage devices.

Only after ehci_init() calls foo_register_driver() is the driver model 
aware of it and will it start calling the probe methods meaning the 
driver_probe_done() would be racing.

I have the sneaking suspicion that this is a bit of a fundamental issue. 
Turning some of the driver level (6) async basicaly removes the ordering 
between drivers and late_initcall (level 7).

I trust it will completely and utterly destroy the point of this patch 
to flush level 6a before starting level 7?


Well, yes, but bugs are bugs. CCing Pavel and Rafael as well :-)

Rene.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/3] fastboot patches series 1, Arjan van de Ven, (Fri Jul 18, 6:15 pm)
Re: [patch 0/3] fastboot patches series 1, Ingo Molnar, (Sun Jul 20, 4:31 am)
Re: [patch 0/3] fastboot patches series 1, Simon Arlott, (Sat Jul 19, 12:51 am)
Re: [patch 0/3] fastboot patches series 1, Arjan van de Ven, (Sat Jul 19, 1:16 am)
Re: [patch 0/3] fastboot patches series 1, Andi Kleen, (Sat Jul 19, 6:22 am)
Re: [patch 0/3] fastboot patches series 1, Simon Arlott, (Sat Jul 19, 1:47 am)
[patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Fri Jul 18, 6:16 pm)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Sat Jul 19, 11:44 am)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Rene Herman, (Sun Jul 20, 3:23 am)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Sun Jul 20, 7:10 am)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Sun Jul 20, 11:35 am)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Fri Jul 18, 11:44 pm)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Sat Jul 19, 1:20 am)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Sat Jul 19, 11:35 am)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Sat Jul 19, 12:14 pm)
Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel, Arjan van de Ven, (Sat Jul 19, 12:58 am)