Skip to content
  • Mel Gorman's avatar
    page allocator: replace __alloc_pages_internal() with __alloc_pages_nodemask() · d239171e
    Mel Gorman authored
    
    
    The start of a large patch series to clean up and optimise the page
    allocator.
    
    The performance improvements are in a wide range depending on the exact
    machine but the results I've seen so fair are approximately;
    
    kernbench:	0	to	 0.12% (elapsed time)
    		0.49%	to	 3.20% (sys time)
    aim9:		-4%	to	30% (for page_test and brk_test)
    tbench:		-1%	to	 4%
    hackbench:	-2.5%	to	 3.45% (mostly within the noise though)
    netperf-udp	-1.34%  to	 4.06% (varies between machines a bit)
    netperf-tcp	-0.44%  to	 5.22% (varies between machines a bit)
    
    I haven't sysbench figures at hand, but previously they were within the
    -0.5% to 2% range.
    
    On netperf, the client and server were bound to opposite number CPUs to
    maximise the problems with cache line bouncing of the struct pages so I
    expect different people to report different results for netperf depending
    on their exact machine and how they ran the test (different machines, same
    cpus client/server, shared cache but two threads client/server, different
    socket client/server etc).
    
    I also measured the vmlinux sizes for a single x86-based config with
    CONFIG_DEBUG_INFO enabled but not CONFIG_DEBUG_VM.  The core of the
    .config is based on the Debian Lenny kernel config so I expect it to be
    reasonably typical.
    
    This patch:
    
    __alloc_pages_internal is the core page allocator function but essentially
    it is an alias of __alloc_pages_nodemask.  Naming a publicly available and
    exported function "internal" is also a big ugly.  This patch renames
    __alloc_pages_internal() to __alloc_pages_nodemask() and deletes the old
    nodemask function.
    
    Warning - This patch renames an exported symbol.  No kernel driver is
    affected by external drivers calling __alloc_pages_internal() should
    change the call to __alloc_pages_nodemask() without any alteration of
    parameters.
    
    Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
    Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
    Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Reviewed-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Cc: Dave Hansen <dave@linux.vnet.ibm.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    d239171e