diff options
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 9c9b7545c810..f8bc977ccbbe 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -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 | ||