]> Git Repo - linux.git/commit - mm/vmscan.c
mm: vmscan: forcibly scan highmem if there are too many buffer_heads pinning highmem
authorMel Gorman <[email protected]>
Wed, 21 Mar 2012 23:34:00 +0000 (16:34 -0700)
committerLinus Torvalds <[email protected]>
Thu, 22 Mar 2012 00:54:57 +0000 (17:54 -0700)
commitcc715d99e529d470dde2f33a6614f255adea71f3
treef8e8aefb8416aed6747e9b5c071e9575484aa912
parentce1744f4ed20ca873360e54502f8a71564ef7cc6
mm: vmscan: forcibly scan highmem if there are too many buffer_heads pinning highmem

Stuart Foster reported on bugzilla that copying large amounts of data
from NTFS caused an OOM kill on 32-bit X86 with 16G of memory.  Andrew
Morton correctly identified that the problem was NTFS was using 512
blocks meaning each page had 8 buffer_heads in low memory pinning it.

In the past, direct reclaim used to scan highmem even if the allocating
process did not specify __GFP_HIGHMEM but not any more.  kswapd no longer
will reclaim from zones that are above the high watermark.  The intention
in both cases was to minimise unnecessary reclaim.  The downside is on
machines with large amounts of highmem that lowmem can be fully consumed
by buffer_heads with nothing trying to free them.

The following patch is based on a suggestion by Andrew Morton to extend
the buffer_heads_over_limit case to force kswapd and direct reclaim to
scan the highmem zone regardless of the allocation request or watermarks.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=42578

[[email protected]: move buffer_heads_over_limit check up]
[[email protected]: buffer_heads_over_limit is unlikely]
Reported-by: Stuart Foster <[email protected]>
Tested-by: Stuart Foster <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Signed-off-by: Hugh Dickins <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/vmscan.c
This page took 0.055057 seconds and 4 git commands to generate.