The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Simon.Derr@bull.net, ak@suse.de, linux-kernel@vger.kernel.org,
	clameter@sgi.com
Subject: Re: [PATCH 3/5] cpuset: change marker for relative numbering
Date: Sun, 6 Nov 2005 14:49:54 -0800	[thread overview]
Message-ID: <20051106144954.368713ad.pj@sgi.com> (raw)
In-Reply-To: <20051106125738.7e140f1c.akpm@osdl.org>

Andrew wrote:
> If someone modifies a library-managed cpuset via the backdoor then the
> library (and its caller) are out of sync with reality _anyway_.

Yes, for system-wide operations.  No - for cpuset-relative operations.

For task migration (Christoph Lameter's patches) to work, I need to
provide a safe way for jobs to manage placement within their assigned
cpuset.  This means providing wrappers to sched_setaffinity, mbind and
set_mempolicy that take cpuset-relative cpu/mem numbers, and provide a
robust, cpuset-relative API to applications, that hides any migrations
from the application.

A year ago, Simon Derr pushed hard to get cpuset-relative numbering
support into the kernel, anticipating these sorts of problems.  I and
others pushed back, saying that this was the work of libraries, and
that the kernel-user API needed to use one simple, system-wide numbering.

Enforcing a system-wide synchronization of library code, using just
user code, is expensive, difficult and scales poorly on large systems.

A trivial, code-wise, hook in the kernel will enable each independent
library routine to efficiently detect any parallel changes and redo
their operation sequence.  It enables providing applications with a
cpuset-relative API for internal job memory and cpu placement that is
efficient and robustly safe in the face of migrations.

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

  reply	other threads:[~2005-11-06 22:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-04  5:31 [PATCH 1/5] cpuset: better bitmap remap defaults Paul Jackson
2005-11-04  5:31 ` [PATCH 2/5] cpuset: rebind numa vma mempolicy Paul Jackson
2005-11-07  6:10   ` Paul Jackson
2005-11-04  5:31 ` [PATCH 3/5] cpuset: change marker for relative numbering Paul Jackson
2005-11-05  7:08   ` Andrew Morton
2005-11-06 10:04     ` Paul Jackson
2005-11-06 20:57       ` Andrew Morton
2005-11-06 22:49         ` Paul Jackson [this message]
2005-11-04  5:31 ` [PATCH 4/5] cpuset: mempolicy one more nodemask conversion Paul Jackson
2005-11-04  5:31 ` [PATCH 5/5] cpuset: memory reclaim rate meter Paul Jackson
2005-11-05  7:13   ` Andrew Morton
2005-11-05  7:34     ` Paul Jackson
2005-11-05  7:43     ` Paul Jackson
2005-11-05  7:27   ` 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=20051106144954.368713ad.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=Simon.Derr@bull.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.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