]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpusets: randomize node rotor used in cpuset_mem_spread_node()
authorJack Steiner <steiner@sgi.com>
Fri, 10 Aug 2012 11:45:33 +0000 (04:45 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 10 Aug 2012 13:53:54 +0000 (06:53 -0700)
commitf0429fdbff77e28a09e9b608c64954e51e58a7db
tree57302660550fd152f5ff9c132a93649bdb31c8a9
parent41b1698c1184eaaadca354d73f12e72210f875da
cpusets: randomize node rotor used in cpuset_mem_spread_node()

Some workloads that create a large number of small files tend to assign
too many pages to node 0 (multi-node systems).  Part of the reason is that
the rotor (in cpuset_mem_spread_node()) used to assign nodes starts at
node 0 for newly created tasks.

This patch changes the rotor to be initialized to a random node number of
the cpuset.

[akpm@linux-foundation.org: fix layout]
[Lee.Schermerhorn@hp.com: Define stub numa_random() for !NUMA configuration]
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Paul Menage <menage@google.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Conflicts:

arch/x86/mm/numa.c
arch/x86/mm/numa.c
include/linux/bitmap.h
include/linux/nodemask.h
kernel/fork.c
lib/bitmap.c