kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: I/O event notification mechanism - select() or epoll() ?
Date: Fri, 28 Sep 2012 07:23:47 +0200	[thread overview]
Message-ID: <20120928052346.GA2274@grml> (raw)
In-Reply-To: <CA+NV+Vm67XNLrjLjzEF6jz6oqOp=PtRZQb7nFuBJ2Vk3Mvy3Fg@mail.gmail.com>

Hi!

On 17:19 Wed 26 Sep     , Rahul Bedarkar wrote:
> Hi,
> 
> I have to capture kernel udev events through libudev. One of API
> provides asynchronous events by reading on file descriptor. I found
> that there two ways to do that.
> 
> 1) select call
> 2) epoll
> 
> I also found that epoll is smarter and meant to replace old select call.
> 
> What are your thoughts on these ? Which one is better ?

If you are ok to be limited to linux, I would highly recommend using epoll
because of scaleability. Using select is almost like creating a new epoll
descriptor for every call instead of reusing it.

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com

  parent reply	other threads:[~2012-09-28  5:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 11:49 I/O event notification mechanism - select() or epoll() ? Rahul Bedarkar
2012-09-26 15:49 ` Peter Teoh
2012-09-28  5:23 ` michi1 at michaelblizek.twilightparadox.com [this message]
2012-09-28  5:28   ` Rahul Bedarkar
2012-09-28 17:05 ` Jonathan Neuschäfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120928052346.GA2274@grml \
    --to=michi1@michaelblizek.twilightparadox.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).