]> Git Repo - linux.git/commit
page allocator: use a pre-calculated value instead of num_online_nodes() in fast...
authorChristoph Lameter <[email protected]>
Tue, 16 Jun 2009 22:32:15 +0000 (15:32 -0700)
committerLinus Torvalds <[email protected]>
Wed, 17 Jun 2009 02:47:35 +0000 (19:47 -0700)
commit62bc62a873116805774ffd37d7f86aa4faa832b1
tree7f3f5b94b2d484a13ca27b8d3f6f54cfe126d7c0
parent974709bdb2a34db378fc84140220f363f558d0d6
page allocator: use a pre-calculated value instead of num_online_nodes() in fast paths

num_online_nodes() is called in a number of places but most often by the
page allocator when deciding whether the zonelist needs to be filtered
based on cpusets or the zonelist cache.  This is actually a heavy function
and touches a number of cache lines.

This patch stores the number of online nodes at boot time and updates the
value when nodes get onlined and offlined.  The value is then used in a
number of important paths in place of num_online_nodes().

[[email protected]: do not override definition of node_set_online() with macro]
Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Lee Schermerhorn <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/nodemask.h
mm/hugetlb.c
mm/page_alloc.c
mm/slub.c
net/sunrpc/svc.c
This page took 0.054273 seconds and 4 git commands to generate.