From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752909AbbAIBxL (ORCPT ); Thu, 8 Jan 2015 20:53:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbbAIBxI (ORCPT ); Thu, 8 Jan 2015 20:53:08 -0500 Date: Fri, 9 Jan 2015 09:52:48 +0800 From: Fam Zheng To: Andy Lutomirski Cc: Miklos Szeredi , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Alexander Viro , Andrew Morton , Juri Lelli , Zach Brown , David Drysdale , Kees Cook , Alexei Starovoitov , David Herrmann , Dario Faggioli , "Theodore Ts'o" , Peter Zijlstra , Vivek Goyal , Mike Frysinger , Heiko Carstens , Rasmus Villemoes , Oleg Nesterov , Mathieu Desnoyers , Fabian Frederick , Josh Triplett , "David S. Miller" , Linux FS Devel , Linux API , Paolo Bonzini , Stefan Hajnoczi , "Michael Kerrisk (man-pages)" Subject: Re: [PATCH 0/3] epoll: Add epoll_pwait1 syscall Message-ID: <20150109015248.GA5034@fam-t430.nay.redhat.com> References: <1420705550-24245-1-git-send-email-famz@redhat.com> <1420708372.18399.15.camel@suse.cz> <20150109011608.GA2924@fam-t430.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 01/08 17:28, Andy Lutomirski wrote: > On Thu, Jan 8, 2015 at 5:25 PM, Fam Zheng wrote: > > On Thu, 01/08 09:57, Andy Lutomirski wrote: > >> I'd like to see a more ambitious change, since the timer isn't the > >> only problem like this. Specifically, I'd like a syscall that does a > >> list of epoll-related things and then waits. The list of things could > >> include, at least: > >> > >> - EPOLL_CTL_MOD actions: level-triggered epoll users are likely to > >> want to turn on and off their requests for events on a somewhat > >> regular basis. > > > > This sounds good to me. > > > >> > >> - timerfd_settime actions: this allows a single syscall to wait and > >> adjust *both* monotonic and real-time wakeups. > > > > I'm not sure, doesn't this break orthogonality between epoll and timerfd? > > Yes. It's not very elegant, and more elegant ideas are welcome. What is the purpose of embedding timerfd operation here? Modifying timerfd for each poll doesn't sound a common pattern to me. > > > > >> > >> Would this make sense? It could look like: > >> > >> int epoll_mod_and_pwait(int epfd, > >> struct epoll_event *events, int maxevents, > >> struct epoll_command *commands, int ncommands, > >> const sigset_t *sigmask); > > > > What about flags? > > > > No room. Maybe it should just be a struct for everything instead of > separate args. Also no room for timeout. A single struct sounds the only way to go. Fam