mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Hockin <thockin@hockin.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: vatsa@in.ibm.com, lhcs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, torvalds@osdl.org, akpm@osdl.org,
	rml@tech9.net
Subject: Re: CPU Hotplug: Hotplug Script And SIGPWR
Date: Tue, 20 Jan 2004 00:37:01 -0800	[thread overview]
Message-ID: <20040120083700.GB15733@hockin.org> (raw)
In-Reply-To: <20040120082232.ED1282C2ED@lists.samba.org>

On Tue, Jan 20, 2004 at 06:45:41PM +1100, Rusty Russell wrote:
> In message <20040120063316.GA9736@hockin.org> you write:
> > I added a new TASK_UNRUNNABLE state for these tasks, too.  By adding the
> > task's current (or most recent) CPU and the task's cpus_allowed and
> > cpus_allowed_mask to /proc/pid/status, we gave simple tools for finding
> > these unrunnable tasks.
> > 
> > I think the sanest thing for a CPU removal is to migrate everything off the
> > processor in question, move unrunnable tasks into TASK_UNRUNNABLE state,
> > then notify /sbin/hotplug.  The hotplug script can then find and handle the
> > unrunnable tasks.  No SIGPWR grossness needed.
> 
> Interesting.
> 
> The downside is that you now need some script needs to know what to do
> with the tasks (unless you have something like DBUS, but that's a ways

Well, if we provide a sane example script, the rest is up to the distros or
the people with this hardware to decide.

> off).  There are no correctness concerns AFAICT with userspace not
> being on a particular CPU, just performance.

Correctness does matter if an affined task violates that affinity.  If we
are going to provide explicit affinity, we need to honor it under all
conditions, or at least provide an option to honor it.

> The SIGPWR solution lets a random process deal appropriately without
> having to interface with /sbin/hotplug, if it wants to.  And it's a
> lot less invasive.

I agree about invasiveness.  Maybe a combo?  Send SIGPWR iff a task is
actually handling it, otherwise mark it TASK_UNRUNNABLE and let hotplug
handle it?  A new signal would be much more polite, but SIGPWR can be made
to work.  What if a process catches SIGPWR, but does not handle CPU removal?
Do we wait for it's signal handler to finish before re-evaluating it for
TASK_UNRUNNABLE?  Yuck.  If a CPU gets yanked with no warning, where do we
run the signal handler?  Violating affinity again.

Tim

  reply	other threads:[~2004-01-20  8:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040116174446.A2820@in.ibm.com>
2004-01-20  5:44 ` Rusty Russell
2004-01-20  6:33   ` Tim Hockin
2004-01-20  6:43     ` Nick Piggin
2004-01-20  6:52       ` Tim Hockin
2004-01-20  7:11         ` Nick Piggin
2004-01-20  7:30           ` Tim Hockin
2004-01-20  7:45             ` Nick Piggin
2004-01-20  7:54               ` Tim Hockin
2004-01-20  8:14                 ` Nick Piggin
2004-01-20  8:29                   ` Tim Hockin
2004-01-20  8:37                     ` Nick Piggin
2004-01-20  8:43                       ` Tim Hockin
2004-01-21  4:06                         ` Srivatsa Vaddagiri
2004-01-21  4:14                           ` Nick Piggin
2004-01-21  5:09                             ` Srivatsa Vaddagiri
2004-01-21  7:08                               ` Tim Hockin
2004-01-21 15:07                                 ` Matthias Urlichs
2004-01-22  5:29                                 ` Rusty Russell
2004-01-21  7:09                             ` Tim Hockin
2004-01-21  7:31                               ` Nick Piggin
2004-01-21  7:42                                 ` Tim Hockin
2004-01-21  8:11                             ` Rusty Russell
2004-01-21  5:07                           ` Rusty Russell
2004-01-20  8:41                   ` Stefan Smietanowski
2004-01-20  8:49                     ` Nick Piggin
2004-01-20  9:12                       ` Tim Hockin
2004-01-21  0:00                 ` Rusty Russell
2004-01-20 23:51         ` Rusty Russell
2004-01-20  7:45     ` Rusty Russell
2004-01-20  8:37       ` Tim Hockin [this message]
2004-01-20  9:29         ` Srivatsa Vaddagiri
2004-01-21  0:12         ` Rusty Russell
     [not found] <fa.f37o48p.1io5q5@ifi.uio.no>
     [not found] ` <fa.frjqvfo.170g8hq@ifi.uio.no>
2004-01-20 17:49   ` Andy Lutomirski
2004-01-21  4:33     ` Rusty Russell

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=20040120083700.GB15733@hockin.org \
    --to=thockin@hockin.org \
    --cc=akpm@osdl.org \
    --cc=lhcs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@osdl.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®