Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 17 Oct 2002 15:06:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 17 Oct 2002 15:06:28 -0400 Received: from x35.xmailserver.org ([208.129.208.51]:60046 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id ; Thu, 17 Oct 2002 15:06:27 -0400 X-AuthUser: davidel@xmailserver.org Date: Thu, 17 Oct 2002 12:20:42 -0700 (PDT) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: "Charles 'Buck' Krasic" cc: John Gardiner Myers , Benjamin LaHaise , Dan Kegel , Shailabh Nagar , linux-kernel , linux-aio , Andrew Morton , David Miller , Linus Torvalds , Stephen Tweedie Subject: Re: [PATCH] async poll for 2.5 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1831 Lines: 49 On 17 Oct 2002, Charles 'Buck' Krasic wrote: > > Hi Davide, > > On thinking about this a bit, I wonder if the evtmask isn't superflous > in sys_epoll_addf? (And in the existing epoll interface where the > application writes to /dev/epoll). > > As you say, the normal usage will be to register for all events > anyway. My wrapper library does exactly that. As you say, not having > to continously switch the mask is the simpler way to go. If > registering for all events is the only sensible approach, the argument > isn't needed at all. > > What do you think? It's a minor detail, I know. Even if it is the fastest way to use the API, iI would still prefer such behaviour to be encoded in wrapper libraries instead of inside the API itself. Having a choice is usually better that not having it, if the cost for having a choice is not too much ( and in this particular case is not ). > Taking the idea further, I would prefer that ALL non-blocking sockets > are automatically added to the epoll interest set if the application > has already called epoll_create(). Maybe that behaviour could be an > option to epoll_create(). Same thing, I would leave this task to your my_socket() and my_accept(). I think what is really missing about /dev/epoll is an easy-to-use interface library to avoid users confused by the presence of "poll" inside its name, to use it like select()/poll(). > BTW, I'm not clear on another aspect of the API below, is there still > an mmap() for the pollfd buffers? Yes, it creates a mapping shared between the kernel and the user space. - Davide - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/