[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091119210909.b112bc77.akpm@linux-foundation.org>
Date: Thu, 19 Nov 2009 21:09:09 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Tejun Heo <tj@...nel.org>
Cc: torvalds@...ux-foundation.org, awalls@...ix.net,
linux-kernel@...r.kernel.org, jeff@...zik.org, mingo@...e.hu,
jens.axboe@...cle.com, rusty@...tcorp.com.au,
cl@...ux-foundation.org, dhowells@...hat.com,
arjan@...ux.intel.com, avi@...hat.com, peterz@...radead.org,
johannes@...solutions.net
Subject: Re: [PATCH 07/19] acpi: use queue_work_on() instead of binding
workqueue worker to cpu0
On Fri, 20 Nov 2009 13:46:35 +0900 Tejun Heo <tj@...nel.org> wrote:
> ACPI works need to be executed on cpu0 and acpi/osl.c achieves this by
> creating singlethread workqueue and then binding it to cpu0 from a
> work which is quite unorthodox. Make it create regular workqueues and
> use queue_work_on() instead. This is in preparation of concurrency
> managed workqueue and the extra workers won't be a problem after it's
> implemented.
>
> ...
>
> acpi_status acpi_os_initialize1(void)
> {
> - /*
> - * On some machines, a software-initiated SMI causes corruption unless
> - * the SMI runs on CPU 0. An SMI can be initiated by any AML, but
> - * typically it's done in GPE-related methods that are run via
> - * workqueues, so we can avoid the known corruption cases by binding
> - * the workqueues to CPU 0.
> - */
> - kacpid_wq = create_singlethread_workqueue("kacpid");
> - bind_workqueue(kacpid_wq);
> - kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify");
> - bind_workqueue(kacpi_notify_wq);
> - kacpi_hotplug_wq = create_singlethread_workqueue("kacpi_hotplug");
> - bind_workqueue(kacpi_hotplug_wq);
> + kacpid_wq = create_workqueue("kacpid");
> + kacpi_notify_wq = create_workqueue("kacpi_notify");
> + kacpi_hotplug_wq = create_workqueue("kacpi_hotplug");
Well that sucks. We create an additional ((num_possible_cpus()-1)*3)
kernel threads just because the previous code was "unorthodox"?
I guess that problem goes away with concurrency-managed workqueues.
But please let's not merge this patch without also merging
concurrency-managed workqueues!
--
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