aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2009-06-16 15:32:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 19:47:41 -0700
commitb70d94ee438b3fd9c15c7691d7a932a135c18101 (patch)
treea33e88b812c0cd8a18017e34dcddcea7715320c9 /mm/memory_hotplug.c
parent31c911329e048b715a1dfeaaf617be9430fd7f4e (diff)
downloadkernel_samsung_smdk4412-b70d94ee438b3fd9c15c7691d7a932a135c18101.zip
kernel_samsung_smdk4412-b70d94ee438b3fd9c15c7691d7a932a135c18101.tar.gz
kernel_samsung_smdk4412-b70d94ee438b3fd9c15c7691d7a932a135c18101.tar.bz2
page-allocator: use integer fields lookup for gfp_zone and check for errors in flags passed to the page allocator
This simplifies the code in gfp_zone() and also keeps the ability of the compiler to use constant folding to get rid of gfp_zone processing. The lookup of the zone is done using a bitfield stored in an integer. So the code in gfp_zone is a simple extraction of bits from a constant bitfield. The compiler is generating a load of a constant into a register and then performs a shift and mask operation to get the zone from a gfp_t. No cachelines are touched and no branches have to be predicted by the compiler. We are doing some macro tricks here to convince the compiler to always do the constant folding if possible. Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Mel Gorman <mel@csn.ul.ie> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
0 files changed, 0 insertions, 0 deletions