From: Andrew Morton <akpm@linux-foundation.org>
To: Tejun Heo <tj@kernel.org>
Cc: torvalds@linux-foundation.org, awalls@radix.net,
linux-kernel@vger.kernel.org, jeff@garzik.org, mingo@elte.hu,
jens.axboe@oracle.com, rusty@rustcorp.com.au,
cl@linux-foundation.org, dhowells@redhat.com,
arjan@linux.intel.com, avi@redhat.com, peterz@infradead.org,
johannes@sipsolutions.net
Subject: Re: [PATCH 07/19] acpi: use queue_work_on() instead of binding workqueue worker to cpu0
Date: Thu, 19 Nov 2009 21:09:09 -0800 [thread overview]
Message-ID: <20091119210909.b112bc77.akpm@linux-foundation.org> (raw)
In-Reply-To: <1258692407-8985-8-git-send-email-tj@kernel.org>
On Fri, 20 Nov 2009 13:46:35 +0900 Tejun Heo <tj@kernel.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!
next prev parent reply other threads:[~2009-11-20 5:11 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 4:46 [PATCHSET] workqueue: prepare for concurrency managed workqueue, take#2 Tejun Heo
2009-11-20 4:46 ` [PATCH 01/19] sched, kvm: fix race condition involving sched_in_preempt_notifers Tejun Heo
2009-11-20 4:46 ` [PATCH 02/19] workqueue: Add debugobjects support Tejun Heo
2009-11-20 4:46 ` [PATCH 03/19] sched: rename preempt_notifier to sched_notifier and always enable it Tejun Heo
2009-11-20 4:46 ` [PATCH 04/19] sched: update sched_notifier and add wakeup/sleep notifications Tejun Heo
2009-11-20 4:46 ` [PATCH 05/19] sched: implement sched_notifier_wake_up_process() Tejun Heo
2009-11-21 12:02 ` Peter Zijlstra
2009-11-20 4:46 ` [PATCH 06/19] scheduler: implement force_cpus_allowed() Tejun Heo
2009-11-21 12:04 ` Peter Zijlstra
2009-11-20 4:46 ` [PATCH 07/19] acpi: use queue_work_on() instead of binding workqueue worker to cpu0 Tejun Heo
2009-11-20 5:09 ` Andrew Morton [this message]
2009-11-20 6:24 ` Tejun Heo
2009-11-20 4:46 ` [PATCH 08/19] stop_machine: reimplement without using workqueue Tejun Heo
2009-11-20 4:46 ` [PATCH 09/19] workqueue: misc/cosmetic updates Tejun Heo
2009-11-20 4:46 ` [PATCH 10/19] workqueue: merge feature parametesr into flags Tejun Heo
2009-11-20 4:46 ` [PATCH 11/19] workqueue: update cwq alignement and make one more flag bit available Tejun Heo
2009-11-20 4:46 ` [PATCH 12/19] workqueue: define both bit position and mask for work flags Tejun Heo
2009-11-20 4:46 ` [PATCH 13/19] workqueue: separate out process_one_work() Tejun Heo
2009-11-20 4:46 ` [PATCH 14/19] workqueue: temporarily disable workqueue tracing Tejun Heo
2009-11-20 4:46 ` [PATCH 15/19] workqueue: kill cpu_populated_map Tejun Heo
2009-11-20 8:40 ` Tejun Heo
2009-11-20 4:46 ` [PATCH 16/19] workqueue: reimplement workqueue flushing using color coded works Tejun Heo
2009-12-04 11:46 ` Peter Zijlstra
2009-12-04 19:42 ` Tejun Heo
2009-12-07 8:46 ` Peter Zijlstra
2009-12-07 10:40 ` Tejun Heo
2009-12-07 10:42 ` Peter Zijlstra
2009-12-07 10:48 ` Tejun Heo
2009-11-20 4:46 ` [PATCH 17/19] workqueue: introduce worker Tejun Heo
2009-11-20 23:44 ` Andy Walls
2009-11-21 2:53 ` Tejun Heo
2009-11-20 4:46 ` [PATCH 18/19] workqueue: reimplement work flushing using linked works Tejun Heo
2009-11-20 4:46 ` [PATCH 19/19] workqueue: reimplement workqueue freeze using cwq->frozen_works queue Tejun Heo
2009-11-21 3:37 ` [PATCHSET] workqueue: prepare for concurrency managed workqueue, take#2 Tejun Heo
2009-11-21 12:07 ` Peter Zijlstra
2009-11-23 1:48 ` Tejun Heo
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=20091119210909.b112bc77.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=avi@redhat.com \
--cc=awalls@radix.net \
--cc=cl@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rusty@rustcorp.com.au \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/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