Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932823AbZKZQ2D (ORCPT ); Thu, 26 Nov 2009 11:28:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932562AbZKZQ2A (ORCPT ); Thu, 26 Nov 2009 11:28:00 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:55064 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932583AbZKZQ16 (ORCPT ); Thu, 26 Nov 2009 11:27:58 -0500 From: "Kirill A. Shutemov" 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" 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: X-Mailer: git-send-email 1.6.5.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 25 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/