public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: anton@samba.org, akpm@osdl.org, Simon.Derr@bull.net,
	linux-kernel@vger.kernel.org, ak@suse.de, iwamoto@valinux.co.jp
Subject: Re: [Patch 4/4] cpusets top mask just online, not all possible
Date: Sat, 11 Sep 2004 22:35:05 -0700	[thread overview]
Message-ID: <20040911223505.5bfe6138.pj@sgi.com> (raw)
In-Reply-To: <1094964209.16406.22.camel@localhost>

Dave wrote:
> Is it easy to tell if a given page was influenced by a cpusets
> allocation?  How would the memory removal code know which task[s] to go
> and update?

It is not nearly as easy as for cpus to know which tasks to update,
because cpus have a list of tasks on them.

And it is not nearly as easy as for cpus to _do_ the update, because a
tasks memory placement, unlike its cpu placement, can not be changed by
a third party.  So one has to leave a hint laying in wait for the task
to be changed, which the task can trip over and use to trigger its own
memory placement update.  Grep for 'generation' in kernel/cpuset.c for
the cpuset version of this hint.

We will need two pieces:

 1) We will need some user space code, that walks through
    all cpusets, and for each cpuset that includes the node
    in question, updates that cpuset to not have that node
    (which will bump that cpusets generation).

 2) Then each task that is attached to that cpuset, the next
    time that task is about to ask for memory (in one of the
    mm/mempolicy routines, just before entering __alloc_pages())
    will notice the generation number on its cpuset has changed,
    and the cpuset_update_current_mems_allowed() code will
    update the tasks mems_allowed to the correct, online, value.

With what I expect to submit to lkml for *-mm in a few hours,
piece (2) will be complete and ready to go.  Piece (1) can wait.

> We'll fix it when we get there :)

Yup.

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

  reply	other threads:[~2004-09-12  5:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-11  8:28 [Patch 0/4] four small cpuset patches Paul Jackson
2004-09-11  8:28 ` [Patch 1/4] cpusets display allowed masks in proc status Paul Jackson
2004-09-11  8:28 ` [Patch 2/4] cpusets simplify cpus_allowed setting in attach Paul Jackson
2004-09-11  8:28 ` [Patch 3/4] cpusets remove useless validation check Paul Jackson
2004-09-11  8:28 ` [Patch 4/4] cpusets top mask just online, not all possible Paul Jackson
2004-09-11 14:10   ` Anton Blanchard
2004-09-11 17:07     ` Paul Jackson
2004-09-11 17:28       ` Dave Hansen
2004-09-12  2:21         ` Paul Jackson
2004-09-12  4:43           ` Dave Hansen
2004-09-12  5:35             ` Paul Jackson [this message]
2004-09-12  5:42             ` Paul Jackson
2004-09-11 17:39       ` Dave Hansen
2004-09-11 18:55       ` Andi Kleen
2004-09-12  2:29         ` 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=20040911223505.5bfe6138.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=Simon.Derr@bull.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=haveblue@us.ibm.com \
    --cc=iwamoto@valinux.co.jp \
    --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