summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Weiner2012-11-29 22:54:23 +0100
committerLinus Torvalds2012-11-30 17:51:17 +0100
commit60cefed485a02bd99b6299dad70666fe49245da7 (patch)
tree4392ca5fa1cb409d3badc786bf5e2d0fed34ab1c /Makefile
parentmm/vmemmap: fix wrong use of virt_to_page (diff)
downloadkernel-qcow2-linux-60cefed485a02bd99b6299dad70666fe49245da7.tar.gz
kernel-qcow2-linux-60cefed485a02bd99b6299dad70666fe49245da7.tar.xz
kernel-qcow2-linux-60cefed485a02bd99b6299dad70666fe49245da7.zip
mm: vmscan: fix endless loop in kswapd balancing
Kswapd does not in all places have the same criteria for a balanced zone. Zones are only being reclaimed when their high watermark is breached, but compaction checks loop over the zonelist again when the zone does not meet the low watermark plus two times the size of the allocation. This gets kswapd stuck in an endless loop over a small zone, like the DMA zone, where the high watermark is smaller than the compaction requirement. Add a function, zone_balanced(), that checks the watermark, and, for higher order allocations, if compaction has enough free memory. Then use it uniformly to check for balanced zones. This makes sure that when the compaction watermark is not met, at least reclaim happens and progress is made - or the zone is declared unreclaimable at some point and skipped entirely. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reported-by: George Spelvin <linux@horizon.com> Reported-by: Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de> Reported-by: Tomas Racek <tracek@redhat.com> Tested-by: Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions