From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCHv2 1/3] eventfd: allow atomic read and waitqueue remove Date: Thu, 21 Jan 2010 19:45:38 +0200 Message-ID: <20100121174538.GG16707@redhat.com> References: <20100121162648.GA16458@redhat.com> <4B588B29.2050100@redhat.com> <20100121172336.GA16707@redhat.com> <4B588FCE.7030803@redhat.com> <20100121173259.GC16707@redhat.com> <4B58933C.4090209@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Davide Libenzi , mtosatti@redhat.com, kvm@vger.kernel.org, Linux Kernel Mailing List To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <4B58933C.4090209@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Jan 21, 2010 at 07:47:40PM +0200, Avi Kivity wrote: > On 01/21/2010 07:32 PM, Michael S. Tsirkin wrote: >> >>> Can't you read from the file? >>> >> IMO no, the read could block. >> > > But you're in process context. An eventfd never blocks. Yes it blocks if counter is 0. And we don't know it's not 0 unless we read :) catch-22. > -- > Do not meddle in the internals of kernels, for they are subtle and quick to panic.