linux/mm
Mel Gorman 1741c87757 mm: kswapd: keep kswapd awake for high-order allocations until a percentage of the node is balanced
When reclaiming for high-orders, kswapd is responsible for balancing a
node but it should not reclaim excessively.  It avoids excessive reclaim
by considering if any zone in a node is balanced then the node is
balanced.  In the cases where there are imbalanced zone sizes (e.g.
ZONE_DMA with both ZONE_DMA32 and ZONE_NORMAL), kswapd can go to sleep
prematurely as just one small zone was balanced.

This alters the sleep logic of kswapd slightly.  It counts the number of
pages that make up the balanced zones.  If the total number of balanced
pages is more than a quarter of the zone, kswapd will go back to sleep.
This should keep a node balanced without reclaiming an excessive number of
pages.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Eric B Munson <emunson@mgebm.net>
Cc: Simon Kirby <sim@hostway.ca>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-13 17:32:37 -08:00
..
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2010-10-22 17:31:36 -07:00
Kconfig.debug
Makefile percpu: use percpu allocator on UP too 2010-10-02 10:26:05 +03:00
backing-dev.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
bootmem.c x86, memblock: Replace e820_/_early string with memblock_ 2010-08-27 11:13:47 -07:00
bounce.c bounce: call flush_dcache_page() after bounce_copy_vec() 2010-09-09 18:57:25 -07:00
compaction.c mm: compaction: perform a faster migration scan when migrating asynchronously 2011-01-13 17:32:34 -08:00
debug-pagealloc.c
dmapool.c mm: add a might_sleep_if() to dma_pool_alloc() 2010-10-26 16:52:08 -07:00
fadvise.c
failslab.c
filemap.c mm: remove likely() from grab_cache_page_write_begin() 2011-01-13 17:32:36 -08:00
filemap_xip.c
fremap.c Avoid pgoff overflow in remap_file_pages 2010-09-25 09:34:58 -07:00
highmem.c mm,x86: fix kmap_atomic_push vs ioremap_32.c 2010-10-27 18:03:05 -07:00
hugetlb.c mm/hugetlb.c: avoid double unlock_page() in hugetlb_fault() 2010-12-02 14:51:14 -08:00
hwpoison-inject.c HWPOISON, hugetlb: support hwpoison injection for hugepage 2010-08-11 09:23:11 +02:00
init-mm.c
internal.h mlock: do not hold mmap_sem for extended periods of time 2011-01-13 17:32:36 -08:00
kmemcheck.c
kmemleak-test.c
kmemleak.c
ksm.c ksm: annotate ksm_thread_mutex is no deadlock source 2010-12-02 14:51:15 -08:00
maccess.c MN10300: Save frame pointer in thread_info struct rather than global var 2010-10-27 17:29:01 +01:00
madvise.c
memblock.c memblock: Annotate memblock functions with __init_memblock 2010-10-11 16:00:52 -07:00
memcontrol.c memcg: fix wrong VM_BUG_ON() in try_charge()'s mm->owner check 2010-12-30 10:07:06 -08:00
memory-failure.c mm: migration: allow migration to operate asynchronously and avoid synchronous compaction in the faster path 2011-01-13 17:32:34 -08:00
memory.c mlock: do not hold mmap_sem for extended periods of time 2011-01-13 17:32:36 -08:00
memory_hotplug.c mm: migration: cleanup migrate_pages API by matching types for offlining and sync 2011-01-13 17:32:34 -08:00
mempolicy.c mempolicy: remove tasklist_lock from migrate_pages 2011-01-13 17:32:36 -08:00
mempool.c
migrate.c mm: migration: cleanup migrate_pages API by matching types for offlining and sync 2011-01-13 17:32:34 -08:00
mincore.c
mlock.c mlock: do not hold mmap_sem for extended periods of time 2011-01-13 17:32:36 -08:00
mm_init.c
mmap.c install_special_mapping skips security_file_mmap check. 2010-12-15 12:30:36 -08:00
mmu_context.c
mmu_notifier.c
mmzone.c mm: page allocator: adjust the per-cpu counter threshold when memory is low 2011-01-13 17:32:31 -08:00
mprotect.c perf_events: Fix perf_counter_mmap() hook in mprotect() 2010-11-09 10:19:38 -08:00
mremap.c mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
msync.c
nommu.c mlock: do not hold mmap_sem for extended periods of time 2011-01-13 17:32:36 -08:00
oom_kill.c oom: kill all threads sharing oom killed task's mm 2010-10-26 16:52:05 -07:00
page-writeback.c mm/page-writeback.c: fix __set_page_dirty_no_writeback() return value 2011-01-13 17:32:32 -08:00
page_alloc.c mm: kswapd: stop high-order balancing when any suitable zone is balanced 2011-01-13 17:32:37 -08:00
page_cgroup.c
page_io.c
page_isolation.c mm: page_isolation: codeclean fix comment and rm unneeded val init 2010-10-26 16:52:11 -07:00
pagewalk.c mm: remove call to find_vma in pagewalk for non-hugetlbfs 2010-11-25 06:50:46 +09:00
percpu-km.c percpu: clear memory allocated with the km allocator 2010-10-02 10:28:42 +03:00
percpu-vm.c mm: remove gfp mask from pcpu_get_vm_areas 2011-01-13 17:32:34 -08:00
percpu.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-01-13 10:05:56 -08:00
prio_tree.c
quicklist.c
readahead.c
rmap.c mm/rmap.c: fix comment 2010-12-27 15:14:06 +01:00
shmem.c fs: icache RCU free inodes 2011-01-07 17:50:26 +11:00
slab.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 2011-01-10 08:38:01 -08:00
slob.c kernel: kmem_ptr_validate considered harmful 2011-01-07 17:50:16 +11:00
slub.c mm: convert sprintf_symbol to %pS 2011-01-13 17:32:33 -08:00
sparse-vmemmap.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
sparse.c
swap.c fuse: use release_pages() 2010-10-27 18:03:17 -07:00
swap_state.c
swapfile.c block: make blkdev_get/put() handle exclusive access 2010-11-13 11:55:17 +01:00
thrash.c
truncate.c Call the filesystem back whenever a page is removed from the page cache 2010-12-02 09:55:21 -05:00
util.c kernel: kmem_ptr_validate considered harmful 2011-01-07 17:50:16 +11:00
vmalloc.c vmalloc: remove redundant unlikely() 2011-01-13 17:32:36 -08:00
vmscan.c mm: kswapd: keep kswapd awake for high-order allocations until a percentage of the node is balanced 2011-01-13 17:32:37 -08:00
vmstat.c mm: vmstat: use a single setter function and callback for adjusting percpu thresholds 2011-01-13 17:32:31 -08:00