cpusets: randomize node rotor used in cpuset_mem_spread_node()
[linux-2.6-block.git] / kernel / fork.c
index 17bf7c8d65114497d5cd076a850d9a013e4d4df5..e33177edb3bf6056eeacb9c05a08e2adbd763203 100644 (file)
@@ -1173,6 +1173,10 @@ static struct task_struct *copy_process(unsigned long clone_flags,
        }
        mpol_fix_fork_child_flag(p);
 #endif
+#ifdef CONFIG_CPUSETS
+       p->cpuset_mem_spread_rotor = NUMA_NO_NODE;
+       p->cpuset_slab_spread_rotor = NUMA_NO_NODE;
+#endif
 #ifdef CONFIG_TRACE_IRQFLAGS
        p->irq_events = 0;
 #ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW