From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: LKML <linux-kernel@vger.kernel.org>,
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>,
Oleg Nesterov <oleg@tv-sign.ru>
Subject: Re: [RFC][PATCH][EXPERIMENTAL] CPU hotplug with frozen tasks
Date: Mon, 16 Apr 2007 09:05:31 +0200 [thread overview]
Message-ID: <20070416070531.GC1783@elf.ucw.cz> (raw)
In-Reply-To: <200704160027.58425.rjw@sisk.pl>
Hi!
> As I said before, we have a problem with using the CPU hotplug for suspending
> because of the notifiers that are called from within cpu_up()/cpu_down() and
> (sometimes) assume that the system is fully functional.
>
> One obvious solution of this problem would be to make the notifiers behave
> differently if tasks are frozen, but for this purpose we'd need to tell them
> that this is the case. In principle, we could do it in many different ways
> (eg. by using a global variable, with the help of suspend notifiers etc.), but
> IMO one of the cleanest methods woud be to use some special values for the
> notifications occuring while tasks are frozen (eg. CPU_DEAD_FROZEN instead of
> CPU_DEAD etc.). In that case the notifiers could react in some special ways
> to the "FROZEN" notfifications and that would allow us to simplify some code
> paths (eg. in the microcode driver).
>
> The appended patch introduces such "FROZEN" notfifications, modifies the CPU
> hotplug core to use them and updates all of the users of CPU hotplug notifiers
> to recognize them. For now, they are treated in the same way as the
> corresponding "normal" notifications, but I'm going to modify the microcode
> driver to really use them and I believe that some other subsystems can benefit
> from using them as well.
>
> The patch is totally experimental and untested, although it's been successfully
> compiled on x86_64 and it's main purpose is to show what exactly I
> mean. :-)
Looks sane to me.
> Index: linux-2.6.21-rc6/kernel/cpu.c
> ===================================================================
> --- linux-2.6.21-rc6.orig/kernel/cpu.c 2007-04-16 00:24:56.000000000 +0200
> +++ linux-2.6.21-rc6/kernel/cpu.c 2007-04-16 00:25:14.000000000 +0200
> @@ -120,11 +120,12 @@ static int take_cpu_down(void *unused)
> }
>
> /* Requires cpu_add_remove_lock to be held */
> -static int _cpu_down(unsigned int cpu)
> +static int _cpu_down(unsigned int cpu, int tasks_frozen)
> {
> int err;
> struct task_struct *p;
> cpumask_t old_allowed, tmp;
> + unsigned long mod = tasks_frozen ? 0x0008 : 0;
>
Can we get constant instead of 0x0008 here?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-04-16 7:05 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 [this message]
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
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=20070416070531.GC1783@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--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.