Commit:     30150f8d7b76f25b1127a5079528b7a17307f995
Parent:     79603a35009ff39562cd5634fa1cf513eb080f27
Author:     Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 22 20:40:45 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jan 23 07:52:06 2007 -0800

    [PATCH] mbind: restrict nodes to the currently allowed cpuset
    Currently one can specify an arbitrary node mask to mbind that includes
    nodes not allowed.  If that is done with an interleave policy then we will
    go around all the nodes.  Those outside of the currently allowed cpuset
    will be redirected to the border nodes.  Interleave will then create
    imbalances at the borders of the cpuset.
    This patch restricts the nodes to the currently allowed cpuset.
    The RFC for this patch was discussed at
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
    Cc: Paul Jackson <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 mm/mempolicy.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index da94639..c2aec0e 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -884,6 +884,10 @@ asmlinkage long sys_mbind(unsigned long start, unsigned 
long len,
        err = get_nodes(&nodes, nmask, maxnode);
        if (err)
                return err;
+       /* Restrict the nodes to the allowed nodes in the cpuset */
+       nodes_and(nodes, nodes, current->mems_allowed);
        return do_mbind(start, len, mode, &nodes, flags);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to