From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Gautham Shenoy <ego.lkml@gmail.com>,
LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Gautham R Shenoy <ego@in.ibm.com>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [RFC][PATCH][EXPERIMENTAL] CPU hotplug with frozen tasks
Date: Mon, 23 Apr 2007 23:19:42 +0400 [thread overview]
Message-ID: <20070423191942.GA301@tv-sign.ru> (raw)
In-Reply-To: <200704162327.59758.rjw@sisk.pl>
On 04/16, Rafael J. Wysocki wrote:
>
> Appended is the updated version of the patch (in addition to the changes
> mentioned above I've eliminated the magic constant 0x0008 from cpu.c by
> changing the new definitions in notifier.h).
Most sub-systems doesn't care about CPU_TASKS_FROZEN bit. Take for example
workqueue.c,
> --- linux-2.6.21-rc7.orig/kernel/workqueue.c 2007-04-16 23:05:17.000000000 +0200
> +++ linux-2.6.21-rc7/kernel/workqueue.c 2007-04-16 23:05:45.000000000 +0200
> @@ -757,6 +757,7 @@ static int __devinit workqueue_cpu_callb
>
> switch (action) {
> case CPU_UP_PREPARE:
> + case CPU_UP_PREPARE_FROZEN:
> mutex_lock(&workqueue_mutex);
> /* Create a new workqueue thread for it. */
> list_for_each_entry(wq, &workqueues, list) {
> @@ -768,6 +769,7 @@ static int __devinit workqueue_cpu_callb
> break;
>
> case CPU_ONLINE:
> + case CPU_ONLINE_FROZEN:
> /* Kick off worker threads. */
> list_for_each_entry(wq, &workqueues, list) {
> struct cpu_workqueue_struct *cwq;
> @@ -780,6 +782,7 @@ static int __devinit workqueue_cpu_callb
> break;
>
> case CPU_UP_CANCELED:
> + case CPU_UP_CANCELED_FROZEN:
> list_for_each_entry(wq, &workqueues, list) {
> if (!per_cpu_ptr(wq->cpu_wq, hotcpu)->thread)
> continue;
> @@ -792,14 +795,17 @@ static int __devinit workqueue_cpu_callb
> break;
>
> case CPU_DOWN_PREPARE:
> + case CPU_DOWN_PREPARE_FROZEN:
> mutex_lock(&workqueue_mutex);
> break;
>
> case CPU_DOWN_FAILED:
> + case CPU_DOWN_FAILED_FROZEN:
> mutex_unlock(&workqueue_mutex);
> break;
>
> case CPU_DEAD:
> + case CPU_DEAD_FROZEN:
> list_for_each_entry(wq, &workqueues, list)
> cleanup_workqueue_thread(wq, hotcpu);
> list_for_each_entry(wq, &workqueues, list)
I think it is better to add
action &= ~CPU_TASKS_FROZEN;
at the head of workqueue_cpu_callback() instead. I think this way
you can make this patch a lot simpler and smaller.
Oleg.
prev parent reply other threads:[~2007-04-23 19:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-06 15:32 [RFD] CPU hotplug and suspend Rafael J. Wysocki
2007-04-06 15:56 ` Eric W. Biederman
2007-04-09 14:03 ` Pavel Machek
2007-04-09 13:14 ` Rafael J. Wysocki
2007-04-16 7:01 ` Pavel Machek
2007-04-15 22:27 ` [RFC][PATCH][EXPERIMENTAL] CPU hotplug with frozen tasks Rafael J. Wysocki
2007-04-16 7:05 ` Pavel Machek
2007-04-16 21:06 ` Rafael J. Wysocki
2007-04-16 9:50 ` Gautham Shenoy
2007-04-16 21:27 ` Rafael J. Wysocki
2007-04-18 9:42 ` Gautham R Shenoy
2007-04-18 17:07 ` Rafael J. Wysocki
2007-04-23 19:19 ` Oleg Nesterov [this message]
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=20070423191942.GA301@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=ego.lkml@gmail.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=vatsa@in.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.