diff options
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 9c9b7545c810..10131fdaff70 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include <linux/sort.h> | 55 | #include <linux/sort.h> |
56 | 56 | ||
57 | #include <asm/uaccess.h> | 57 | #include <asm/uaccess.h> |
58 | #include <asm/atomic.h> | 58 | #include <linux/atomic.h> |
59 | #include <linux/mutex.h> | 59 | #include <linux/mutex.h> |
60 | #include <linux/workqueue.h> | 60 | #include <linux/workqueue.h> |
61 | #include <linux/cgroup.h> | 61 | #include <linux/cgroup.h> |
@@ -2460,11 +2460,19 @@ static int cpuset_spread_node(int *rotor) | |||
2460 | 2460 | ||
2461 | int cpuset_mem_spread_node(void) | 2461 | int cpuset_mem_spread_node(void) |
2462 | { | 2462 | { |
2463 | if (current->cpuset_mem_spread_rotor == NUMA_NO_NODE) | ||
2464 | current->cpuset_mem_spread_rotor = | ||
2465 | node_random(¤t->mems_allowed); | ||
2466 | |||
2463 | return cpuset_spread_node(¤t->cpuset_mem_spread_rotor); | 2467 | return cpuset_spread_node(¤t->cpuset_mem_spread_rotor); |
2464 | } | 2468 | } |
2465 | 2469 | ||
2466 | int cpuset_slab_spread_node(void) | 2470 | int cpuset_slab_spread_node(void) |
2467 | { | 2471 | { |
2472 | if (current->cpuset_slab_spread_rotor == NUMA_NO_NODE) | ||
2473 | current->cpuset_slab_spread_rotor = | ||
2474 | node_random(¤t->mems_allowed); | ||
2475 | |||
2468 | return cpuset_spread_node(¤t->cpuset_slab_spread_rotor); | 2476 | return cpuset_spread_node(¤t->cpuset_slab_spread_rotor); |
2469 | } | 2477 | } |
2470 | 2478 | ||