From owner-cvs-src@FreeBSD.ORG Mon May 14 22:00:36 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0ED916A403; Mon, 14 May 2007 22:00:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 89ACE13C44C; Mon, 14 May 2007 22:00:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l4EM0Y8C036642; Mon, 14 May 2007 18:00:34 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Poul-Henning Kamp" Date: Mon, 14 May 2007 17:57:22 -0400 User-Agent: KMail/1.9.6 References: <1155.1179177093@critter.freebsd.dk> In-Reply-To: <1155.1179177093@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705141757.22971.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 14 May 2007 18:00:34 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3243/Mon May 14 06:49:49 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, Alexander Motin , src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libnetgraph internal.h msg.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 22:00:37 -0000 On Monday 14 May 2007 05:11:33 pm Poul-Henning Kamp wrote: > In message <200705141645.55584.jhb@freebsd.org>, John Baldwin writes: > >On Monday 14 May 2007 10:18:41 am Alexander Motin wrote: > > >> Log: > >> Replace select() by poll() to avoid problems with big > >> descriptor number. > > > >Why not kevent(2)? > > kevent(2) is most useful if you have many descriptors open > (ie: apache). Hmm, some other things use it too even with few fd's such as the name resolver in libc. > poll(2) works quite well for a low number of descriptors, > and doesn't care what their numeric numbers are. > > select(2) is terrible unless you have a limited number of descriptors > and they are all low numbered. This is because of the array > representation. > > > Given that poll(2) is a much simpler API than kqueue(2), I'd > say it was the right choice here. That's fine, was just asking. :) -- John Baldwin