]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memcg: correct RESOURCE_MAX to ULLONG_MAX
authorSha Zhengju <handai.szj@taobao.com>
Thu, 15 Aug 2013 23:39:37 +0000 (09:39 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 Aug 2013 07:27:10 +0000 (17:27 +1000)
commit34e57c2daaa32cdb9a575d2c6811c1791289b1d3
tree89d3b7776f1e4b194a41543f7d3a6afe064a1e14
parentd2b6ca39ebd498526c1fdef7d5682c7afa60d8d3
memcg: correct RESOURCE_MAX to ULLONG_MAX

Current RESOURCE_MAX is ULONG_MAX, but the value we used to set resource
limit is unsigned long long, so we can set bigger value than that which is
strange.  The XXX_MAX should be reasonable max value, bigger than that
should be overflow.

Notice that this change will affect user output of default *.limit_in_bytes:
before change:
$ cat /cgroup/memory/memory.limit_in_bytes
9223372036854775807

after change:
$ cat /cgroup/memory/memory.limit_in_bytes
18446744073709551615

But it doesn't alter the API in term of input - we can still use "echo -1
> *.limit_in_bytes" to reset the numbers to "unlimited".

Signed-off-by: Sha Zhengju <handai.szj@taobao.com>
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Jeff Liu <jeff.liu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/res_counter.h