]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/vmscan.c: consider swap space when deciding whether to continue reclaim
authorMinchan Kim <minchan@kernel.org>
Tue, 10 Jan 2012 23:08:18 +0000 (15:08 -0800)
committerJerry Snitselaar <jerry.snitselaar@oracle.com>
Sun, 7 Oct 2012 06:04:31 +0000 (23:04 -0700)
commitb16d586637d2fef1368a253184933f5074ced6e6
treebb32d0d9ca1ffdd741b0b76ce525b608b2ae50d2
parentacea88a9ed0c2a3458fe9b7fdad9f4732576f556
mm/vmscan.c: consider swap space when deciding whether to continue reclaim

commit 86cfd3a45042ab242d47f3935a02811a402beab6 upstream.

Stable note: Not tracked in Bugzilla. This patch reduces kswapd CPU
usage on swapless systems with high anonymous memory usage.

It's pointless to continue reclaiming when we have no swap space and lots
of anon pages in the inactive list.

Without this patch, it is possible when swap is disabled to continue
trying to reclaim when there are only anonymous pages in the system even
though that will not make any progress.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 503e973ce4a57bc949ddbf35d4b4ecd1a90263f8)

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
mm/vmscan.c