Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 15 Oct 2002 19:09:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 15 Oct 2002 19:09:13 -0400 Received: from x35.xmailserver.org ([208.129.208.51]:10134 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id ; Tue, 15 Oct 2002 19:09:09 -0400 X-AuthUser: davidel@xmailserver.org Date: Tue, 15 Oct 2002 16:23:11 -0700 (PDT) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: John Gardiner Myers cc: Dan Kegel , Benjamin LaHaise , 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: <3DAC9D2B.4050309@netscape.com> 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: 1250 Lines: 32 On Tue, 15 Oct 2002, John Gardiner Myers wrote: > Davide Libenzi wrote: > > >There're many ways to have /dev/epoll working in a threaded environment if > >you think about it, and no you don't need to have a single thread fetching > >events. You can have, if you really like threads, N fetching threads ( > >working on N private /dev/epoll fds ), feeding M queues > > > In such models, you still have to pay the cost of divvying up the events > after you receive them. You also have to worry about keeping load > distributed evenly enough. That's exactly the reason why you don't want to use many threads. Typical applications that uses multiplex interfaces uses only one task ( eventually for each CPU ) that handles many connections. And again, you can also use threads, if you design your application correctly. It is not that expensive having service threads popping from an array. Yes, you have a lock to be acquired but this is a price you have to pay as soon as you choose threads. - 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/