From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with SMTP id D87646B00AE for ; Thu, 26 Nov 2009 11:28:06 -0500 (EST) Received: by mail-bw0-f215.google.com with SMTP id 7so722013bwz.6 for ; Thu, 26 Nov 2009 08:28:05 -0800 (PST) From: "Kirill A. Shutemov" Subject: [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications Date: Thu, 26 Nov 2009 18:27:36 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: owner-linux-mm@kvack.org To: containers@lists.linux-foundation.org, linux-mm@kvack.org Cc: Paul Menage , Li Zefan , Andrew Morton , KAMEZAWA Hiroyuki , Balbir Singh , Pavel Emelyanov , linux-kernel@vger.kernel.org, "Kirill A. Shutemov" List-ID: 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 " " 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 -- 1.6.5.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org