remarkable-linux/include
Mel Gorman dac1d27bc8 mm: use zonelists instead of zones when direct reclaiming pages
The following patches replace multiple zonelists per node with two zonelists
that are filtered based on the GFP flags.  The patches as a set fix a bug with
regard to the use of MPOL_BIND and ZONE_MOVABLE.  With this patchset, the
MPOL_BIND will apply to the two highest zones when the highest zone is
ZONE_MOVABLE.  This should be considered as an alternative fix for the
MPOL_BIND+ZONE_MOVABLE in 2.6.23 to the previously discussed hack that filters
only custom zonelists.

The first patch cleans up an inconsistency where direct reclaim uses
zonelist->zones where other places use zonelist.

The second patch introduces a helper function node_zonelist() for looking up
the appropriate zonelist for a GFP mask which simplifies patches later in the
set.

The third patch defines/remembers the "preferred zone" for numa statistics, as
it is no longer always the first zone in a zonelist.

The forth patch replaces multiple zonelists with two zonelists that are
filtered.  The two zonelists are due to the fact that the memoryless patchset
introduces a second set of zonelists for __GFP_THISNODE.

The fifth patch introduces helper macros for retrieving the zone and node
indices of entries in a zonelist.

The final patch introduces filtering of the zonelists based on a nodemask.
Two zonelists exist per node, one for normal allocations and one for
__GFP_THISNODE.

Performance results varied depending on the machine configuration.  In real
workloads the gain/loss will depend on how much the userspace portion of the
benchmark benefits from having more cache available due to reduced referencing
of zonelists.

These are the range of performance losses/gains when running against
2.6.24-rc4-mm1.  The set and these machines are a mix of i386, x86_64 and
ppc64 both NUMA and non-NUMA.
			     loss   to  gain
Total CPU time on Kernbench: -0.86% to  1.13%
Elapsed   time on Kernbench: -0.79% to  0.76%
page_test from aim9:         -4.37% to  0.79%
brk_test  from aim9:         -0.71% to  4.07%
fork_test from aim9:         -1.84% to  4.60%
exec_test from aim9:         -0.71% to  1.08%

This patch:

The allocator deals with zonelists which indicate the order in which zones
should be targeted for an allocation.  Similarly, direct reclaim of pages
iterates over an array of zones.  For consistency, this patch converts direct
reclaim to use a zonelist.  No functionality is changed by this patch.  This
simplifies zonelist iterators in the next patch.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
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>
2008-04-28 08:58:18 -07:00
..
acpi
asm-alpha generic: implement __fls on all 64-bit archs 2008-04-26 19:21:16 +02:00
asm-arm ide: add struct ide_io_ports (take 3) 2008-04-27 15:38:32 +02:00
asm-avr32 avr32: add include/asm-avr32/serial.h 2008-04-19 20:40:10 -04:00
asm-blackfin [Blackfin] arch: add include/boot .gitignore files 2008-04-25 08:29:11 +08:00
asm-cris ide: add struct ide_io_ports (take 3) 2008-04-27 15:38:32 +02:00
asm-frv frv: remove HARD_RESET_NOW() 2008-04-21 16:03:13 -07:00
asm-generic bitops: use __fls for fls64 on 64-bit archs 2008-04-26 19:21:16 +02:00
asm-h8300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-ia64 KVM: Rename VCPU_MP_STATE_* to KVM_MP_STATE_* 2008-04-27 12:04:13 +03:00
asm-m32r Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-m68k Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-m68knommu Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-mips Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-generic-bitops-v3 2008-04-26 13:46:11 -07:00
asm-mn10300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-parisc generic: implement __fls on all 64-bit archs 2008-04-26 19:21:16 +02:00
asm-powerpc KVM: ppc: PowerPC 440 KVM implementation 2008-04-27 18:21:39 +03:00
asm-ppc [POWERPC] 4xx: Fix duplicate phys_addr_t definition 2008-04-24 20:57:34 +10:00
asm-s390 KVM: s390: Improve pgste accesses 2008-04-27 12:01:00 +03:00
asm-sh generic: implement __fls on all 64-bit archs 2008-04-26 19:21:16 +02:00
asm-sparc [SPARC64]: NUMA device infrastructure. 2008-04-23 23:32:16 -07:00
asm-sparc64 generic: implement __fls on all 64-bit archs 2008-04-26 19:21:16 +02:00
asm-um Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-v850 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-x86 Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-04-27 10:13:52 -07:00
asm-xtensa Generic semaphore implementation 2008-04-17 10:42:34 -04:00
crypto [CRYPTO] aes: Export generic setkey 2008-04-21 10:19:34 +08:00
keys KEYS: Fix the comment to match the file name in rxrpc-type.h. 2008-04-21 22:43:55 +00:00
linux mm: use zonelists instead of zones when direct reclaiming pages 2008-04-28 08:58:18 -07:00
math-emu
media V4L/DVB (7677): saa7134: Add/fix Beholder entries 2008-04-24 14:09:46 -03:00
mtd UBI: make ubi-header.h local 2008-04-17 11:31:58 +03:00
net IPv6 support for NFS server export caches 2008-04-23 16:13:36 -04:00
pcmcia
rdma IB: convert struct class_device to struct device 2008-04-19 19:10:30 -07:00
rxrpc
scsi [SCSI] rework scsi_target allocation 2008-04-22 15:16:31 -05:00
sound [ALSA] Define MPU401 registers in sound/mpu401_uart.h 2008-04-24 12:38:22 +02:00
video
xen xen: add balloon driver 2008-04-24 23:57:33 +02:00
Kbuild