diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2014-10-10 00:28:54 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-10 04:25:59 +0200 |
commit | 3fbe724424fb104aaca9973389b4a9df428c3e2a (patch) | |
tree | e7ea929957ae225de95624b6b59b85f8c34684e8 /Documentation/frv | |
parent | mm: memcontrol: do not kill uncharge batching in free_pages_and_swap_cache (diff) | |
download | linux-3fbe724424fb104aaca9973389b4a9df428c3e2a.tar.xz linux-3fbe724424fb104aaca9973389b4a9df428c3e2a.zip |
mm: memcontrol: simplify detecting when the memory+swap limit is hit
When attempting to charge pages, we first charge the memory counter and
then the memory+swap counter. If one of the counters is at its limit, we
enter reclaim, but if it's the memory+swap counter, reclaim shouldn't swap
because that wouldn't change the situation. However, if the counters have
the same limits, we never get to the memory+swap limit. To know whether
reclaim should swap or not, there is a state flag that indicates whether
the limits are equal and whether hitting the memory limit implies hitting
the memory+swap limit.
Just try the memory+swap counter first.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Dave Hansen <dave@sr71.net>
Cc: Greg Thelen <gthelen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/frv')
0 files changed, 0 insertions, 0 deletions