From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kirill A. Shutemov" Subject: Re: [PATCH 1/4] eventfd: introduce eventfd_signal_hangup() Date: Mon, 4 Feb 2013 12:15:21 +0200 Message-ID: <20130204101521.GA18322@shutemov.name> References: <510CB733.2080904@huawei.com> <510CB744.7000300@huawei.com> <20130202155858.GA13022@shutemov.name> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20130202155858.GA13022-oKw7cIdHH8eLwutG50LtGA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Li Zefan Cc: Tejun Heo , LKML , Cgroups , Davide Libenzi , Aaron Durbin , Greg Thelen On Sat, Feb 02, 2013 at 05:58:58PM +0200, Kirill A. Shutemov wrote: > On Sat, Feb 02, 2013 at 02:50:44PM +0800, Li Zefan wrote: > > When an eventfd is closed, a wakeup with POLLHUP will be issued, > > but cgroup wants to issue wakeup explicitly, so when a cgroup is > > removed userspace can be notified. > > > > Signed-off-by: Li Zefan Hm.. Looks like it will break eventfd semantics: 1. One eventfd can be used for deliver more then one notification from one or more cgroups. POLLHUP on removing one of cgroups is not valid. 2. It's valid to have eventfd opened only by one userspace application. We should not close it, just because cgroup is removed. I think problem with multiple threads waiting an event on eventfd should be handled in userspace. -- Kirill A. Shutemov