Revision bbdb396a60b2ebf7de3b717991e5d3e28c8b7bbd authored by Martin Bligh on 28 October 2006, 17:38:25 UTC, committed by Linus Torvalds on 28 October 2006, 18:30:51 UTC
If try_to_free_pages / balance_pgdat are called with a gfp_mask specifying
GFP_IO and/or GFP_FS, they will reclaim the requisite number of pages, and the
reset prev_priority to DEF_PRIORITY (or to some other high (ie: unurgent)
value).

However, another reclaimer without those gfp_mask flags set (say, GFP_NOIO)
may still be struggling to reclaim pages.  The concurrent overwrite of
zone->prev_priority will cause this GFP_NOIO thread to unexpectedly cease
deactivating mapped pages, thus causing reclaim difficulties.

Fix this is to key the distress calculation not off zone->prev_priority, but
also take into account the local caller's priority by using
min(zone->prev_priority, sc->priority)

Signed-off-by: Martin J. Bligh <mbligh@google.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 3bb1a85
History
File Mode Size
Kconfig -rw-r--r-- 5.0 KB
Makefile -rw-r--r-- 1017 bytes
allocpercpu.c -rw-r--r-- 3.7 KB
backing-dev.c -rw-r--r-- 1.7 KB
bootmem.c -rw-r--r-- 12.0 KB
bounce.c -rw-r--r-- 6.5 KB
fadvise.c -rw-r--r-- 2.6 KB
filemap.c -rw-r--r-- 62.9 KB
filemap.h -rw-r--r-- 2.8 KB
filemap_xip.c -rw-r--r-- 10.3 KB
fremap.c -rw-r--r-- 6.1 KB
highmem.c -rw-r--r-- 7.8 KB
hugetlb.c -rw-r--r-- 19.0 KB
internal.h -rw-r--r-- 1.0 KB
madvise.c -rw-r--r-- 8.6 KB
memory.c -rw-r--r-- 71.4 KB
memory_hotplug.c -rw-r--r-- 7.3 KB
mempolicy.c -rw-r--r-- 47.0 KB
mempool.c -rw-r--r-- 9.0 KB
migrate.c -rw-r--r-- 21.3 KB
mincore.c -rw-r--r-- 4.4 KB
mlock.c -rw-r--r-- 5.3 KB
mmap.c -rw-r--r-- 54.2 KB
mmzone.c -rw-r--r-- 925 bytes
mprotect.c -rw-r--r-- 7.5 KB
mremap.c -rw-r--r-- 10.7 KB
msync.c -rw-r--r-- 2.4 KB
nommu.c -rw-r--r-- 31.3 KB
oom_kill.c -rw-r--r-- 11.5 KB
page-writeback.c -rw-r--r-- 26.8 KB
page_alloc.c -rw-r--r-- 83.5 KB
page_io.c -rw-r--r-- 4.5 KB
pdflush.c -rw-r--r-- 6.3 KB
prio_tree.c -rw-r--r-- 6.3 KB
readahead.c -rw-r--r-- 16.9 KB
rmap.c -rw-r--r-- 24.3 KB
shmem.c -rw-r--r-- 62.9 KB
shmem_acl.c -rw-r--r-- 4.6 KB
slab.c -rw-r--r-- 110.0 KB
slob.c -rw-r--r-- 7.9 KB
sparse.c -rw-r--r-- 7.2 KB
swap.c -rw-r--r-- 12.4 KB
swap_state.c -rw-r--r-- 9.3 KB
swapfile.c -rw-r--r-- 43.1 KB
thrash.c -rw-r--r-- 2.7 KB
tiny-shmem.c -rw-r--r-- 3.2 KB
truncate.c -rw-r--r-- 11.2 KB
util.c -rw-r--r-- 1.7 KB
vmalloc.c -rw-r--r-- 17.1 KB
vmscan.c -rw-r--r-- 46.9 KB
vmstat.c -rw-r--r-- 15.5 KB

back to top