Date: Mon, 14 May 2007 17:57:22 -0400 From: John Baldwin <jhb@freebsd.org> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: cvs-src@freebsd.org, Alexander Motin <mav@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libnetgraph internal.h msg.c Message-ID: <200705141757.22971.jhb@freebsd.org> In-Reply-To: <1155.1179177093@critter.freebsd.dk> References: <1155.1179177093@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705141757.22971.jhb>