• K
    memcg: oom notifier · 9490ff27
    KAMEZAWA Hiroyuki 提交于
    Considering containers or other resource management softwares in userland,
    event notification of OOM in memcg should be implemented.  Now, memcg has
    "threshold" notifier which uses eventfd, we can make use of it for oom
    notification.
    
    This patch adds oom notification eventfd callback for memcg.  The usage is
    very similar to threshold notifier, but control file is memory.oom_control
    and no arguments other than eventfd is required.
    
    	% cgroup_event_notifier /cgroup/A/memory.oom_control dummy
    	(About cgroup_event_notifier, see Documentation/cgroup/)
    Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
    Cc: Balbir Singh <balbir@in.ibm.com>
    Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Davide Libenzi <davidel@xmailserver.org>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    9490ff27
memcontrol.c 113.0 KB