login
Header Space

 
 

Re: poll(2) vs kqueue(2) performance

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Edwin Eyan Moragas <haaktu@...>
Cc: <misc@...>
Date: Saturday, April 19, 2008 - 1:50 am

> been reading the select(2) man pages and it mentions poll(2)

select requires that you set up a bit array correctly.  but often
people just use a fd_set, and cause a variety of strange buffer
overflow cases as soon as their fd's happen to be greater than the bit
size of the fd_set.

the kernel has to iterate over these bit arrays a few times.

for everyone involved, poll is just plain cheaper.

finally, go look at the latest commit to lib/libc/net/res_send.c to
see how much easier poll() is to use.


shrug.  performance is only a small part of the whole.


use poll.  it is easier to use -- the behaviours are less surprising.
it is also much more portable.  everyone has select and poll, and
quite honestly poll() is a better select(), even if it came out of
AT&T.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
poll(2) vs kqueue(2) performance, Edwin Eyan Moragas, (Sat Apr 19, 1:27 am)
Re: poll(2) vs kqueue(2) performance, Henning Brauer, (Mon Apr 21, 8:31 am)
Re: poll(2) vs kqueue(2) performance, Marco Peereboom, (Mon Apr 21, 10:43 am)
Re: poll(2) vs kqueue(2) performance, Gilles Chehade, (Mon Apr 21, 5:05 pm)
Re: poll(2) vs kqueue(2) performance, Niels Provos, (Wed Apr 23, 11:31 pm)
Re: poll(2) vs kqueue(2) performance, Marco Peereboom, (Sat Apr 26, 1:53 pm)
Re: poll(2) vs kqueue(2) performance, Jonathan Schleifer, (Sat Apr 19, 5:43 am)
Re: poll(2) vs kqueue(2) performance, Marc Espie, (Mon Apr 21, 8:38 am)
Re: poll(2) vs kqueue(2) performance, Edwin Eyan Moragas, (Mon Apr 21, 9:49 am)
Re: poll(2) vs kqueue(2) performance, Edwin Eyan Moragas, (Sat Apr 19, 11:29 pm)
Re: poll(2) vs kqueue(2) performance, Eric Faurot, (Sat Apr 19, 4:17 am)
Re: poll(2) vs kqueue(2) performance, Edwin Eyan Moragas, (Sat Apr 19, 4:38 am)
Re: poll(2) vs kqueue(2) performance , Theo de Raadt, (Sat Apr 19, 1:50 am)
Re: poll(2) vs kqueue(2) performance, Edwin Eyan Moragas, (Sat Apr 19, 2:46 am)
speck-geostationary