From: Paul Jackson <pj@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Paul Jackson <pj@sgi.com>, Simon Derr <Simon.Derr@bull.net>,
Andi Kleen <ak@suse.de>, Christoph Lameter <clameter@sgi.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/5] cpuset: rebind numa vma mempolicy
Date: Thu, 3 Nov 2005 21:31:20 -0800 (PST) [thread overview]
Message-ID: <20051104053120.549.73652.sendpatchset@jackhammer.engr.sgi.com> (raw)
In-Reply-To: <20051104053109.549.76824.sendpatchset@jackhammer.engr.sgi.com>
When automatically rebinding a NUMA mempolicy of a task
that is moved to a different cpuset, or of the tasks in
a cpuset whose memory placement 'mems' is changed, this
patch adds the code to rebind the mempolicies of the
vma's in the tasks memory space as well.
Signed-off-by: Paul Jackson <pj@sgi.com>
---
mm/mempolicy.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
--- 2.6.14-rc5-mm1-cpuset-patches.orig/mm/mempolicy.c 2005-10-29 21:22:39.068225953 -0700
+++ 2.6.14-rc5-mm1-cpuset-patches/mm/mempolicy.c 2005-10-29 21:30:56.420406908 -0700
@@ -1262,10 +1262,19 @@ static void rebind_policy(struct mempoli
/*
* Someone moved this task to different nodes. Fixup mempolicies.
*
- * TODO - fixup current->mm->vma and shmfs/tmpfs/hugetlbfs policies as well,
- * once we have a cpuset mechanism to mark which cpuset subtree is migrating.
+ * TODO - fixup shmfs/tmpfs/hugetlbfs policies as well.
*/
void numa_policy_rebind(const nodemask_t *old, const nodemask_t *new)
{
+ struct mm_struct *mm = current->mm;
+
+ if (mm) {
+ struct vm_area_struct *vma;
+
+ down_write(&mm->mmap_sem);
+ for (vma = mm->mmap; vma; vma = vma->vm_next)
+ rebind_policy(vma->vm_policy, old, new);
+ up_write(&mm->mmap_sem);
+ }
rebind_policy(current->mempolicy, old, new);
}
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
next prev parent reply other threads:[~2005-11-04 5:31 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 ` Paul Jackson [this message]
2005-11-07 6:10 ` [PATCH 2/5] cpuset: rebind numa vma mempolicy 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
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=20051104053120.549.73652.sendpatchset@jackhammer.engr.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