android_kernel_xiaomi_sm7250/include
Christoph Lameter b70d94ee43 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>
2009-06-16 19:47:41 -07:00
..
acpi Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel 2009-04-28 17:21:20 -07:00
asm-generic Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
crypto
drm Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2009-06-12 18:09:18 -07:00
keys
linux page-allocator: use integer fields lookup for gfp_zone and check for errors in flags passed to the page allocator 2009-06-16 19:47:41 -07:00
math-emu
media
mtd
net pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US 2009-06-15 02:31:47 -07:00
pcmcia
rdma
rxrpc
scsi Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
sound Merge branch 'topic/pcm-jiffies-check' into for-linus 2009-06-10 07:26:41 +02:00
trace Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
video fb: add support of LCD display controller on pxa168/910 (base layer) 2009-06-13 00:09:09 +08:00
xen
Kbuild