From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [PATCH 1/1] eventfd: implementation of EFD_MASK flag Date: Thu, 7 Feb 2013 22:36:43 -0800 Message-ID: References: <1360219292-19754-1-git-send-email-sustrik@250bpm.com> <5113FCA7.4020207@mit.edu> <51140A60.4070705@250bpm.com> <51148C93.6020204@250bpm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Alexander Viro , Andrew Morton , Sha Zhengju , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Martin Sustrik Return-path: In-Reply-To: <51148C93.6020204@250bpm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Feb 7, 2013 at 9:26 PM, Martin Sustrik wrote: > Hi Andy, > > > On 08/02/13 02:03, Andy Lutomirski wrote: >> >> There may be some >> advantage to adding (later on, if needed) an option to change the >> flags set in: >> >> + if (waitqueue_active(&ctx->wqh)) >> + wake_up_locked_poll(&ctx->wqh, >> + (unsigned long)ctx->mask.events); >> >> (i.e. to allow the second parameter to omit some bits that were >> already signaled.) Allowing write to write a bigger struct in the >> future won't break anything. > > > I think I don't follow. Either the second parameter is supposed to be > *newly* signaled events, in which case the events that were already signaled > in the past should be ommitted, or it is meant to be *all* signaled events, > in which case the current implementation is OK. I defer to the experts here. But I suspect that if you want to perfectly emulate sockets, you may need to vary what you specify. (IIRC tcp sockets report an EPOLLIN edge every time data is received even if the receive buffer wasn't empty.) --Andy