[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Using timerfd and signalfd on Linux

On Fri, Mar 19, 2010 at 8:42 AM, Shuo Chen <giantchen@xxxxxxxxx> wrote:
> Hi there,
> Is it possible that libevent 2.0 utilizes timerfd and/or signalfd
> provided by recent Linux kernels?
>  - timerfd features a better timing resolution (microseconds) than
> epoll (milliseconds), and

I wouldn't mind support for this if it turns out to run reasonably
efficiently.  It _would_ add a syscall to every pass through the event
loop (as we adjusted the timer), but perhaps that's acceptable to do.
You'd want it to be an option in the event_base_cfg, so that people
who don't care about sub-msec timings don't take the performance hit,
I'd think.

>  - signalfd makes signal handling like reading a file descriptor

It's clean, but would it make a user-visible difference in our current behavior?

For both of these, I wouldn't mind a good patch.

To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.