mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
mm: test PageSwapBacked in lumpy reclaim
commit 043bcbe5ec upstream.
Stable note: Not tracked in Bugzilla. There were reports of shared
mapped pages being unfairly reclaimed in comparison to older kernels.
This is being addressed over time. Even though the subject
refers to lumpy reclaim, it impacts compaction as well.
Lumpy reclaim does well to stop at a PageAnon when there's no swap, but
better is to stop at any PageSwapBacked, which includes shmem/tmpfs too.
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Mel Gorman <mgorman@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
503e973ce4
commit
d2b02236b8
@@ -1199,7 +1199,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
|
||||
* anon page which don't already have a swap slot is
|
||||
* pointless.
|
||||
*/
|
||||
if (nr_swap_pages <= 0 && PageAnon(cursor_page) &&
|
||||
if (nr_swap_pages <= 0 && PageSwapBacked(cursor_page) &&
|
||||
!PageSwapCache(cursor_page))
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user