From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [PATCH Resend] epoll: add EPOLLEXCLUSIVE support Date: Thu, 05 Apr 2012 15:30:59 -0700 Message-ID: <4F7E1D23.1080507@mit.edu> References: <1332943060-18374-1-git-send-email-hagen@jauu.net> <20120328162108.GB2381@redhat.com> <20120328195848.GA5331@hell> <20120329141653.GA2424@redhat.com> <20120329150541.GB3173@hell> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jason Baron , richard -rw- weinberger , torvalds@linux-foundation.org, LKML , Al Viro , Lucas De Marchi , Andrew Morton , linux-fsdevel@vger.kernel.org, eric.dumazet@gmail.com To: Hagen Paul Pfeifer Return-path: Received: from DMZ-MAILSEC-SCANNER-8.MIT.EDU ([18.7.68.37]:44196 "EHLO dmz-mailsec-scanner-8.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136Ab2DEWgM (ORCPT ); Thu, 5 Apr 2012 18:36:12 -0400 In-Reply-To: <20120329150541.GB3173@hell> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 03/29/2012 08:05 AM, Hagen Paul Pfeifer wrote: > * Jason Baron | 2012-03-29 10:16:53 [-0400]: > >> Right, for level triggered events, they all wait up. However, if you use >> edge triggered, ie add 'EPOLLET', then the event gets 'consumed' by the >> first thread that wakes up, and the subseqent waiters wouldn't get woken >> up. IE you'll get one wakeup. > > I addressed level triggered, right - it match the model. But I don't wanted to > wake up every every thread anyway. I don't want to abandon level triggered > functioning. I think that what you want is a mode in which, once epoll_wait returns, the bits it returns get cleared from the event mask. Am I right? (To get this right, you'd need another flag that disables the automatic addition of POLLERR and POLLHUP.) If you do that and add an extra syscall that simultaneously does a bunch of epoll_ctls, a timerfd_settime, and an epoll_wait, I'll be extra happy. --Andy