]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: vmscan: clarify how swappiness, highest priority, memcg interact
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 7 Feb 2013 01:26:11 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:16 +0000 (16:46 +1100)
commitcbde8bbbafca84b4f2783a7136c0d2b302a6de39
tree3032bceb0d481aad14eb9c85bf665763a8db6268
parent6cc05adcd88681841778350caca64d4fb339bcd6
mm: vmscan: clarify how swappiness, highest priority, memcg interact

A swappiness of 0 has a slightly different meaning for global reclaim (may
swap if file cache really low) and memory cgroup reclaim (never swap,
ever).

In addition, global reclaim at highest priority will scan all LRU lists
equal to their size and ignore other balancing heuristics.  UNLESS
swappiness forbids swapping, then the lists are balanced based on recent
reclaim effectiveness.  UNLESS file cache is running low, then anonymous
pages are force-scanned.

This (total mess of a) behaviour is implicit and not obvious from the way
the code is organized.  At least make it apparent in the code flow and
document the conditions.  It will be it easier to come up with sane
semantics later.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Satoru Moriya <satoru.moriya@hds.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Simon Jeons <simon.jeons@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c