]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memcg: allow setting low_limit
authorMichal Hocko <mhocko@suse.cz>
Sat, 17 May 2014 13:19:26 +0000 (23:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 20 May 2014 08:14:12 +0000 (18:14 +1000)
commit763b1d2d74a60be93114d60135f1c2ae53d3a75d
tree7b92d13f6ec3831d6b0ac623a48d03d85449c15e
parentfb63a2d445c91c47c8247d161e48be5bf648f388
memcg: allow setting low_limit

Export memory.low_limit_in_bytes knob with the same rules as the hard
limit represented by limit_in_bytes knob (e.g.  no limit to be set for the
root cgroup).  There is no memsw alternative for low_limit_in_bytes
because the primary motivation behind this limit is to protect the working
set of the group and so considering swap doesn't make much sense.  There
is also no kmem variant exported because we do not have any easy way to
protect kernel allocations now.

Please note that the low limit might exceed the hard limit which basically
means that the group is not reclaimable if there is other reclaim target
in the hierarchy under pressure.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/res_counter.h
kernel/res_counter.c
mm/memcontrol.c