From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH RFC 5/6] epoll: Add implementation for epoll_mod_wait Date: Wed, 21 Jan 2015 12:50:44 +0100 Message-ID: <54BF9294.3070902@redhat.com> References: <1421747878-30744-1-git-send-email-famz@redhat.com> <1421747878-30744-6-git-send-email-famz@redhat.com> <54BE4F1D.7090807@gmail.com> <20150121045903.GA2858@fam-t430.nay.redhat.com> <54BF5ACE.6030206@gmail.com> <20150121085827.GB23024@ad.nay.redhat.com> <54BF814F.7090703@redhat.com> <20150121111404.GA3804@ad.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "Michael Kerrisk (man-pages)" , Andy Lutomirski , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Alexander Viro , Andrew Morton , Kees Cook , David Herrmann , Alexei Starovoitov , Miklos Szeredi , David Drysdale , Oleg Nesterov , "David S. Miller" , Vivek Goyal , Mike Frysinger , "Theodore Ts'o" , Heiko Carstens , Rasmus Villemoes , Rashika Kheria , Hugh Dickins , Mathieu Desnoyers To: Fam Zheng Return-path: In-Reply-To: <20150121111404.GA3804-ZfWej9ACyHUXGNroddHbYwC/G2K4zDHf@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On 21/01/2015 12:14, Fam Zheng wrote: > > My take for simplicity will be leaving epoll_ctl as-is, and my take for > > performance will be epoll_pwait1. And I don't really like putting my time on > > epoll_ctl_batch, thinking it as a ambivalent compromise in between. > > > I agree with Michael actually. The big change is going from O(n) > > epoll_ctl calls to O(1), and epoll_ctl_batch achieves that just fine. > > Changing 2 syscalls to 1 is the icing on the cake, but we're talking of > > a fraction of a microsecond. > > Maybe I'm missing something, but in common cases, the set of fds for epoll_wait > doesn't change that radically from one iteration to another, does it? That depends on the application. Paolo