linux/Documentation
Kirill A. Shutemov 2e72b6347c memcg: implement memory thresholds
It allows to register multiple memory and memsw thresholds and gets
notifications when it crosses.

To register a threshold application need:
- create an eventfd;
- open memory.usage_in_bytes or memory.memsw.usage_in_bytes;
- write string like "<event_fd> <memory.usage_in_bytes> <threshold>" to
  cgroup.event_control.

Application will be notified through eventfd when memory usage crosses
threshold in any direction.

It's applicable for root and non-root cgroup.

It uses stats to track memory usage, simmilar to soft limits. It checks
if we need to send event to userspace on every 100 page in/out. I guess
it's good compromise between performance and accuracy of thresholds.

[akpm@linux-foundation.org: coding-style fixes]
[nishimura@mxp.nes.nec.co.jp: fix documentation merge issue]
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Dan Malek <dan@embeddedalley.com>
Cc: Vladislav Buzov <vbuzov@embeddedalley.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:37 -08:00
..
2009-10-01 21:17:49 +02:00
2008-02-14 00:16:13 -05:00
2008-10-16 11:21:30 -07:00
2009-12-16 07:20:05 -08:00
2008-02-03 15:54:28 +02:00
2010-03-02 12:23:49 +01:00
2009-12-09 14:21:36 -08:00
2010-02-28 23:55:20 -08:00
2009-12-12 13:08:16 +01:00
2010-03-01 12:35:43 -03:00
2008-01-11 18:22:30 -06:00
2009-06-18 13:04:04 -07:00
2010-02-26 22:37:29 +01:00
2009-10-04 22:53:41 +02:00
2008-12-03 16:09:53 -07:00
2008-07-25 10:53:30 -07:00
2008-11-14 10:39:26 +11:00
2009-10-15 07:25:20 -06:00
2008-03-24 19:22:19 -07:00
2007-10-18 14:37:32 -07:00
2009-07-01 22:36:22 +02:00
2009-08-28 15:21:12 -04:00
2009-04-27 12:00:27 -07:00
2009-04-27 12:00:27 -07:00
2008-11-12 17:17:17 -08:00
2009-04-14 09:00:23 +10:00