On Thu, 13 Mar 2003, Enache Adrian wrote:

EA>On Thu, Mar 13, 2003 at 07:37:10PM +1100, Peter Jeremy wrote:
EA>> On Thu, Mar 13, 2003 at 01:57:16AM -0500, David Cuthbert wrote:
EA>> >To be honest, I've never passed anything but FD_SETSIZE for this
EA>> >parameter.  When I'm writing a performance critical server, I use poll()
EA>> >instead.  It's faster
EA>>
EA>> This is an interesting claim.  Do you have some pointers to back it up?
EA>> It would seem to be rather unreasonable to claim that poll() is faster
EA>> when (by your own admission) you've never used select() efficiently.
EA>> I could equally say that I always pass getdtablesize() as the second
EA>> argument of poll() and if I'm writing a performance-critical server,
EA>> I use select() instead - it's faster.
EA>
EA>I have no benchmarks, but judging after the way things are implemented
EA>in the FreeBSD kernel, select() is definitely faster.
EA>
EA>Please someone explain me what is meant in select(2) by:
EA>
EA>  If nfds is greater than the number of open files, select() is not guaran-
EA>  teed to examine the unused file descriptors.   For historical reasons,
EA>  select() will always examine the first 256 descriptors.
EA>
EA>Should it be that select() examines also _closed_ file descriptors which
EA>are in the bitmaps ( closed_fd < nfds && closed_fd < 256 ) ?

Isn't that what the EBADF return is for?

EA>(Of course, it won't do that :))

harti
-- 
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
[EMAIL PROTECTED], [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to