public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	Pavel Machek <pavel@ucw.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>,
	Andy Grover <andrew.grover@intel.com>,
	Len Brown <lenb@kernel.org>
Subject: Re: [patch 1/3] fastboot: Create a "asynchronous" initlevel
Date: Sun, 20 Jul 2008 16:20:06 +0200	[thread overview]
Message-ID: <48834996.9060804@keyaccess.nl> (raw)
In-Reply-To: <20080720041039.275c57f9@infradead.org>

On 20-07-08 13:10, Arjan van de Ven wrote:

> On Sun, 20 Jul 2008 09:23:31 +0200
> Rene Herman <rene.herman@keyaccess.nl> 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.
> 
> true for now (but see below)
> 
>> 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 was hoping to not need this ordering. 

May have found an issue with 3/3 for this same reason. You make the ACPI 
button driver async but acpi_wakeup_device_init() is a late_initcall and 
comments that it interacts with the button driver.

The button driver could be a module so a complete reversal of ordering 
between acpi_wakeup_device() and acpi_button_init() might in itself not 
be a problem (undeterministic order even with the button driver builtin 
might be undesireable I guess) but ...

Correct me if I'm wrong but I believe your patch implies that we could 
be racing between acpi_wakeup_device() and acpi_button_init()? If yes, 
do bad things happen when we race checking dev->wakeup.state.enabled?

As far as I can see, the acpi_device_lock isn't serialising here so if 
we have just done the acpi_enable_gpe() in acpi_button_add() but haven't 
set the enabled flag yet we could do it again here it seems.

The ACPI button driver doesn't appear to have a specific maintainer and 
Len Brown was on vacation I believe but this would ideally like a 
comment from that side...

>> I trust it will completely and utterly destroy the point of this
>> patch to flush level 6a before starting level 7?
> 
> Thankfully it doesn't destroy it, the reason for this is that level 6
> itself tends to take long enough to get benefits. It's just that if we
> can get both 6 and 7 it's nicer. But if we end up needing to sync, so
> be it.

I worry...

> Note: syncing on a driver_probe_done() from level 7 is not going to be
> pretty (think "multi-second extra boot time). 
> Part of me wants to only sync level 6a from the first
> driver_probe_done() so that only people who already pay these extra
> seconds suffer this one as well ;-)

Makes sense in this specific case. Generally, utility of late_initcall() 
does seem to be impacted by this. Unless you can be sure that every 
device you depend on is and always will be sync you might as well be 
device_initcall() yourself after all.

Yes, I did note the bit about the endpoint probing already being async 
for example for USB but now you can't even be sure that it _started_ 
meaning you also couldn't really devise some private synchronization 
mechanism either.

Rene.




  reply	other threads:[~2008-07-20 14:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18 22:15 [patch 0/3] fastboot patches series 1 Arjan van de Ven
2008-07-18 22:16 ` [patch 1/3] fastboot: Create a "asynchronous" initlevel Arjan van de Ven
2008-07-19  1:22   ` Daniel Walker
2008-07-19  3:44     ` Arjan van de Ven
2008-07-19  4:11       ` Daniel Walker
2008-07-19  4:58         ` Arjan van de Ven
2008-07-19  5:20         ` Arjan van de Ven
2008-07-19 15:24           ` Daniel Walker
2008-07-19 15:35             ` Arjan van de Ven
2008-07-19 16:08               ` Daniel Walker
2008-07-19 16:14                 ` Arjan van de Ven
2008-07-19  4:28       ` Daniel Walker
2008-07-19  7:53   ` Rene Herman
2008-07-19  8:10     ` Rene Herman
2008-07-19 15:44       ` Arjan van de Ven
2008-07-20  7:23         ` Rene Herman
2008-07-20 11:10           ` Arjan van de Ven
2008-07-20 14:20             ` Rene Herman [this message]
2008-07-20 15:35               ` Arjan van de Ven
2008-07-18 22:16 ` [patch 2/3] fastboot: turn the USB hostcontroller initcalls into async initcalls Arjan van de Ven
2008-07-18 22:17 ` [patch 3/3] fastboot: convert a few non-critical ACPI drivers to " Arjan van de Ven
2008-07-19  4:51 ` [patch 0/3] fastboot patches series 1 Simon Arlott
2008-07-19  5:16   ` Arjan van de Ven
2008-07-19  5:47     ` Simon Arlott
2008-07-19 10:22     ` Andi Kleen
2008-07-20  8:31 ` Ingo Molnar

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=48834996.9060804@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=andrew.grover@intel.com \
    --cc=arjan@infradead.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paul.s.diefenbaugh@intel.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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