kernel_optimize_test/mm
Hugh Dickins a7016235a6 mm: fix migratetype bug which slowed swapping
After memory pressure has forced it to dip into the reserves, 2.6.32's
5f8dcc2121 "page-allocator: split per-cpu
list into one-list-per-migrate-type" has been returning MIGRATE_RESERVE
pages to the MIGRATE_MOVABLE free_list: in some sense depleting reserves.

Fix that in the most straightforward way (which, considering the overheads
of alternative approaches, is Mel's preference): the right migratetype is
already in page_private(page), but free_pcppages_bulk() wasn't using it.

How did this bug show up?  As a 20% slowdown in my tmpfs loop kbuild
swapping tests, on PowerMac G5 with SLUB allocator.  Bisecting to that
commit was easy, but explaining the magnitude of the slowdown not easy.

The same effect appears, but much less markedly, with SLAB, and even
less markedly on other machines (the PowerMac divides into fewer zones
than x86, I think that may be a factor).  We guess that lumpy reclaim
of short-lived high-order pages is implicated in some way, and probably
this bug has been tickling a poor decision somewhere in page reclaim.

But instrumentation hasn't told me much, I've run out of time and
imagination to determine exactly what's going on, and shouldn't hold up
the fix any longer: it's valid, and might even fix other misbehaviours.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-29 10:28:09 -08:00
..
backing-dev.c
bootmem.c
bounce.c
debug-pagealloc.c
dmapool.c
fadvise.c
failslab.c
filemap_xip.c
filemap.c mm: add new 'read_cache_page_gfp()' helper function 2010-01-27 09:20:03 -08:00
fremap.c
highmem.c
hugetlb.c mm: hugetlb: fix clear_huge_page() 2010-01-11 09:34:06 -08:00
hwpoison-inject.c
init-mm.c
internal.h
Kconfig HWPOISON: Add PROC_FS dependency to hwpoison injector v2 2009-12-21 19:56:42 +01:00
Kconfig.debug
kmemcheck.c
kmemleak-test.c
kmemleak.c
ksm.c
maccess.c maccess,probe_kernel: Allow arch specific override probe_kernel_(read|write) 2010-01-07 11:58:36 -06:00
madvise.c
Makefile
memcontrol.c memcg: ensure list is empty at rmdir 2010-01-16 12:15:39 -08:00
memory_hotplug.c
memory-failure.c HWPOISON: Add PROC_FS dependency to hwpoison injector v2 2009-12-21 19:56:42 +01:00
memory.c
mempolicy.c
mempool.c
migrate.c
mincore.c
mlock.c
mm_init.c
mmap.c mm: move sys_mmap_pgoff from util.c 2009-12-30 12:23:27 -08:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nommu.c nommu: fix shared mmap after truncate shrinkage problems 2010-01-16 12:15:40 -08:00
oom_kill.c
page_alloc.c mm: fix migratetype bug which slowed swapping 2010-01-29 10:28:09 -08:00
page_cgroup.c
page_io.c
page_isolation.c
page-writeback.c
pagewalk.c
percpu.c percpu: avoid calling __pcpu_ptr_to_addr(NULL) 2010-01-11 09:34:04 -08:00
prio_tree.c
quicklist.c
readahead.c
rmap.c
shmem.c
slab.c SLAB: Fix lockdep annotation breakage 2009-12-28 20:57:27 +02:00
slob.c
slub.c
sparse-vmemmap.c
sparse.c
swap_state.c
swap.c
swapfile.c
thrash.c
truncate.c vfs: Fix vmtruncate() regression 2010-01-13 16:09:33 -08:00
util.c nommu: don't need get_unmapped_area() for NOMMU 2010-01-16 12:15:40 -08:00
vmalloc.c vmalloc: remove BUG_ON due to racy counting of VM_LAZY_FREE 2010-01-21 07:20:06 -08:00
vmscan.c vmscan: kswapd: don't retry balance_pgdat() if all zones are unreclaimable 2010-01-16 12:15:39 -08:00
vmstat.c