'struct task_struct' has no member named 'mems_allowed' (was: Re: 2.6.20-rc4-mm1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morton wrote (ao):
>   ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc3/2.6.20-rc4-mm1/

>  x86/x86_64 things

> +mbind-restrict-nodes-to-the-currently-allowed-cpuset.patch

I had to revert this patch because of:

===
mm/mempolicy.c: In function 'sys_mbind':
mm/mempolicy.c:885: error: 'struct task_struct' has no member named 'mems_allowed'
make[1]: *** [mm/mempolicy.o] Error 1
make: *** [mm] Error 2
===

===
http://lkml.org/lkml/2007/1/9/375

Date	Tue, 9 Jan 2007 20:15:07 -0800 (PST)
From	Christoph Lameter <>
Subject	mbind: Restrict nodes to the currently allowed cpuset
Digg This

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
http://marc.theaimsgroup.com/?t=116793842100004&r=1&w=2
Signed-off-by: Christoph Lameter <[email protected]>

Index: linux-2.6.19-mm1/mm/mempolicy.c
===================================================================
--- linux-2.6.19-mm1.orig/mm/mempolicy.c	2006-12-11 19:00:38.224610647 -0800
+++ linux-2.6.19-mm1/mm/mempolicy.c	2006-12-13 11:13:10.175294067 -0800
@@ -882,6 +882,7 @@ asmlinkage long sys_mbind(unsigned long 
 	int err;
 
 	err = get_nodes(&nodes, nmask, maxnode);
+	nodes_and(nodes, nodes, current->mems_allowed);
 	if (err)
 		return err;
 	return do_mbind(start, len, mode, &nodes, flags);
===

	With kind regards, Sander

-- 
Humilis IT Services and Solutions
http://www.humilis.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux