login
Header Space

 
 

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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jonathan Schleifer <js@...>
Cc: Edwin Eyan Moragas <haaktu@...>, <misc@...>
Date: Monday, April 21, 2008 - 8:38 am

On Sat, Apr 19, 2008 at 11:43:20AM +0200, Jonathan Schleifer wrote:

As usual, depends what you want to do.

poll() and select() give you control over file descriptors. kqueue
encompasses more events. It's not especially faster, it just leads to
simpler code in case you need the supplementary events.

If all you need to do is watch over a set of file descriptors, poll
and select are the simplest ones to use... and the most portable.

In many, many cases, poll() is better. The only case where select comes
close is when you want to watch over most of your file descriptors (because
you access less memory in such a case).

And then, you should profile. I'm not even sure it makes a difference.

Most of the places in the system where we have select() are legacies: it
it's not broken, don't fix it.
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