[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231123910.3967.34.camel@yakui_zhao.sh.intel.com>
Date: Mon, 05 Jan 2009 10:51:50 +0800
From: Zhao Yakui <yakui.zhao@...el.com>
To: Arjan van de Ven <arjan@...radead.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
"mingo@...e.hu" <mingo@...e.hu>,
"fweisbec@...il.com" <fweisbec@...il.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-ide@...r.kernel.org" <linux-ide@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/4] fastboot: make ACPI bus drivers probe asynchronous
On Sun, 2009-01-04 at 17:58 -0800, Arjan van de Ven wrote:
> On Mon, 05 Jan 2009 10:03:12 +0800
> Zhao Yakui <yakui.zhao@...el.com> wrote:
>
> > On Sun, 2009-01-04 at 09:31 -0800, Arjan van de Ven wrote:
> > > From 20af3efd07b775a27a997e3df1039e20ea18f62b Mon Sep 17 00:00:00
> > > 2001 From: Arjan van de Ven <arjan@...ux.intel.com>
> > > Date: Sun, 4 Jan 2009 05:32:28 -0800
> > > Subject: [PATCH] fastboot: make ACPI bus drivers probe asynchronous
> > >
> > > the various ACPI bus drivers have non-overlapping devices and can
> > > each be run asynchronous. Some of the ACPI drivers (especially the
> > > battery one, but others as well) can take quite a long time to
> > > probe.
> > It seems that all the ACPI drivers are registered asynchronously after
> > this change.
>
> they are registered asynchronously compared to the rest of the kernel,
> but in strict original sequence compared to eachother.
>
>
> > > +static void acpi_bus_register_async(void *data, async_cookie_t
> > > cookie) +{
> > > + int ret;
> > > + struct acpi_driver *driver = data;
> > > + driver->drv.name = driver->name;
> > > + driver->drv.bus = &acpi_bus_type;
> > > + driver->drv.owner = driver->owner;
> > > +
> > > + async_synchronize_cookie(cookie);
> > > +
> > > + ret = driver_register(&driver->drv);
> > > + WARN_ON(ret != 0);
> > > +}
>
> because of the async_synchronize_cookie() call!
After the async_synchronize_cookie is called, the register sequence will
become strict.
But there exist multiple threads. It is possible that the function of
acpi_bus_register_async is called on different threads. In such case the
dependency can't be guaranteed.
Thanks.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists