The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH RFC v0 0/3] cgroup notifications API and memory thresholds
@ 2009-11-26 17:11 Kirill A. Shutemov
  2009-11-26 17:11 ` [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2009-11-26 17:11 UTC (permalink / raw)
  To: containers, linux-mm
  Cc: Paul Menage, Li Zefan, Andrew Morton, KAMEZAWA Hiroyuki,
	Balbir Singh, Pavel Emelyanov, linux-kernel, Kirill A. Shutemov

It's my first attempt to implement cgroup notifications API and memory
thresholds on top of it. The idea of API was proposed by Paul Menage.

It lacks some important features and need more testing, but I want publish
it as soon as possible to get feedback from community.

TODO:
 - memory thresholds on root cgroup;
 - memsw support;
 - documentation.

Kirill A. Shutemov (3):
  cgroup: implement eventfd-based generic API for notifications
  res_counter: implement thresholds
  memcg: implement memory thresholds

 include/linux/cgroup.h      |    8 ++
 include/linux/res_counter.h |   44 +++++++++++
 kernel/cgroup.c             |  181 ++++++++++++++++++++++++++++++++++++++++++-
 kernel/res_counter.c        |    4 +
 mm/memcontrol.c             |  149 +++++++++++++++++++++++++++++++++++
 5 files changed, 385 insertions(+), 1 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications
  2009-11-26 16:27 ` [PATCH RFC v0 0/3] cgroup notifications API and memory thresholds Kirill A. Shutemov
@ 2009-11-26 16:27 Kirill A. Shutemov
  2009-11-26 16:27 ` [PATCH RFC v0 0/3] cgroup notifications API and memory thresholds Kirill A. Shutemov
  0 siblings, 1 reply; 12+ messages in thread
From: Kirill A. Shutemov @ 2009-11-26 16:27 UTC (permalink / raw)
  To: containers, linux-mm
  Cc: Paul Menage, Li Zefan, Andrew Morton, KAMEZAWA Hiroyuki,
	Balbir Singh, Pavel Emelyanov, linux-kernel, Kirill A. Shutemov

This patch introduces write-only file "cgroup.event_control" in every
cgroup.

To register new notification handler you need:
- create an eventfd;
- open a control file to be monitored. Callbacks register_event() and
  unregister_event() must be defined for the control file;
- write "<event_fd> <control_fd> <args>" to cgroup.event_control.
  Interpretation of args is defined by control file implementation;

eventfd will be woken up by control file implementation or when the
cgroup is removed.

To unregister notification handler just close eventfd.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

-- 
1.6.5.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-11-27 11:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-26 17:11 [PATCH RFC v0 0/3] cgroup notifications API and memory thresholds Kirill A. Shutemov
2009-11-26 17:11 ` [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-11-26 17:11 ` [PATCH RFC v0 2/3] res_counter: implement thresholds Kirill A. Shutemov
2009-11-27  0:20   ` Daisuke Nishimura
2009-11-27  2:45     ` KAMEZAWA Hiroyuki
2009-11-27  3:08       ` Balbir Singh
2009-11-27  7:08         ` Kirill A. Shutemov
2009-11-26 17:11 ` [PATCH RFC v0 3/3] memcg: implement memory thresholds Kirill A. Shutemov
     [not found] ` <cover.1259321503.git.kirill@shutemov.name>
2009-11-27 11:55   ` [PATCH RFC v1 1/3] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-11-27 11:55   ` [PATCH RFC v1 2/3] res_counter: implement thresholds Kirill A. Shutemov
2009-11-27 11:55   ` [PATCH RFC v1 3/3] memcg: implement memory thresholds Kirill A. Shutemov
  -- strict thread matches above, loose matches on Subject: below --
2009-11-26 16:27 [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-11-26 16:27 ` [PATCH RFC v0 0/3] cgroup notifications API and memory thresholds Kirill A. Shutemov
2009-11-26 16:27   ` [PATCH RFC v0 2/3] res_counter: implement thresholds Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox