]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: vmscan: decide whether to compact the pgdat based on reclaim progress
authorMel Gorman <mgorman@suse.de>
Thu, 23 May 2013 00:37:17 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 27 May 2013 06:09:04 +0000 (16:09 +1000)
commit8bd4258de65d8613375931e099fb580c615c3711
treed65aaa9219626f9eb6c4c7fecc8cc28a673370c9
parent6c6dd2ce60a8fe4b6301ade63698f19ffe9abe94
mm: vmscan: decide whether to compact the pgdat based on reclaim progress

In the past, kswapd makes a decision on whether to compact memory after
the pgdat was considered balanced.  This more or less worked but it is
late to make such a decision and does not fit well now that kswapd makes a
decision whether to exit the zone scanning loop depending on reclaim
progress.

This patch will compact a pgdat if at least the requested number of pages
were reclaimed from unbalanced zones for a given priority.  If any zone is
currently balanced, kswapd will not call compaction as it is expected the
necessary pages are already available.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Zlatko Calusic <zcalusic@bitsync.net>
Cc: dormando <dormando@rydia.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c