mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Nathan Lynch <ntl@pobox.com>
Cc: steiner@sgi.com, mingo@elte.hu, linux-kernel@vger.kernel.org,
	rml@novell.com
Subject: Re: 2.6.16 - sys_sched_getaffinity & hotplug
Date: Fri, 27 Jan 2006 20:58:34 -0800	[thread overview]
Message-ID: <20060127205834.b5821a02.pj@sgi.com> (raw)
In-Reply-To: <20060128034241.GB18730@localhost.localdomain>

Nathan wrote:
> Which is problematic, because cpuset_cpus_allowed ->
> guarantee_online_cpus restricts the task->cpus_allowed mask to cpus
> which happen to be online at the time of the call to
> sched_setaffinity.  If more cpus come online later, that task can't be
> migrated to them.

Well, sort of.

A task could always migrate - just because a sched_getaffinity
the task did in the past doesn't show a CPU as valid, doesn't stop
the task from asking to pin to that CPU now.

One of three lessons could be taken from your example:
 1) return all possible CPUS (CPU_MASK_ALL, likely), as you recommend
 2) tell the task to not stash possibly stale returns from sched_getaffinity
 3) virtualize app CPU numbers relative to their containing cpuset,
      using an additional layer of user code.

I don't think we (or at least I ;) have an adequate understanding yet
of how hotplug will interact with the CPU affinity and Memory Node
mempolicy system calls, both of which are easier to use if things
don't come and go.  These calls are still, of course, usable, but
the possibilities for the task confusing itself with stale data
increase, and the simple system numbering of CPUs and Nodes by these
system calls makes (properly so) no effort to hide^Wvirtualize
these changes.

I tend to prefer lesson (3) above, but haven't yet delivered the
libraries or tools needed to support this as Open Source, so can't
really expect that preference to be very persuasive to others.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

  reply	other threads:[~2006-01-28  4:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27 23:06 Jack Steiner
2006-01-28  2:58 ` Nathan Lynch
2006-01-29 13:06   ` Jack Steiner
2006-01-28  3:14 ` Paul Jackson
2006-01-28  3:42   ` Nathan Lynch
2006-01-28  4:58     ` Paul Jackson [this message]
2006-01-28  5:23       ` Nathan Lynch
2006-01-28  6:40         ` Paul Jackson
2006-01-28  7:04         ` Paul Jackson
2006-01-28 13:32   ` Ingo Molnar
2006-01-28 16:08     ` Jack Steiner
2006-01-28 19:27     ` Nathan Lynch
2006-01-28 20:06       ` Paul Jackson
2006-01-29 13:51         ` [PATCH] " Jack Steiner
2006-01-28 20:09     ` 2.6.16 " Paul Jackson
2006-01-28 20:50       ` Robert Love
2006-01-28 21:00         ` Paul Jackson
2006-01-29 13:01         ` Ingo Molnar
2006-01-29 16:09           ` Robert Love
2006-01-29 17:26             ` Paul Jackson

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=20060127205834.b5821a02.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ntl@pobox.com \
    --cc=rml@novell.com \
    --cc=steiner@sgi.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

Powered by JetHome