summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>2009-06-18 01:27:20 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 22:03:48 +0200
commitc5b947b28828e82814605824e5db0bc58d66d8c0 (patch)
tree0ce0c8c468668eb30d769fa97a99d332b9d9f987 /include
parentmemcg: fix behavior under memory.limit equals to memsw.limit (diff)
downloadlinux-c5b947b28828e82814605824e5db0bc58d66d8c0.tar.xz
linux-c5b947b28828e82814605824e5db0bc58d66d8c0.zip
memcg: add interface to reset limits
We don't have an interface to reset mem.limit or memsw.limit now. This patch allows to reset mem.limit or memsw.limit when they are being set to -1. Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/res_counter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
index 4c5bcf6ca7e8..511f42fc6816 100644
--- a/include/linux/res_counter.h
+++ b/include/linux/res_counter.h
@@ -49,6 +49,8 @@ struct res_counter {
struct res_counter *parent;
};
+#define RESOURCE_MAX (unsigned long long)LLONG_MAX
+
/**
* Helpers to interact with userspace
* res_counter_read_u64() - returns the value of the specified member.