Share

libevent - an asynchronous event library

Tracker: Patches

5 Support for Edge-Triggered behaviour - ID: 1968284
Last Update: Settings changed ( nickm )

Enables Edge-Triggered behaviour for the polling methods
which support it (currently only epoll and kqueue).
The user event handler is notified of Edge-Triggered behavior by specifying
EV_ET flag in event type.

The user should be aware of possible consequences of
using Edge-Triggered behaviour (see epoll and kqueue manual), i.e IO
starvation. However if used properly could provide additional performance
gain.

Tested on FreeBSD 7.0, Ubuntu 7.04 with Linux kernel 2.6.15.


Valery Kholodkov ( val_kh ) - 2008-05-20 21:40

5

Closed

Accepted

Nobody/Anonymous

None

feature

Public


Comments ( 6 )




Date: 2008-05-30 17:03
Sender: nickmProject Admin


Committed to trunk; thanks!


Date: 2008-05-30 16:25
Sender: nickmProject Admin


Looks good. I'll port it to trunk and commit.


Date: 2008-05-29 18:05
Sender: val_kh


Please see the response in libevent mail list archives:

http://monkeymail.org/archives/libevent-users/2008-May/001264.html


Date: 2008-05-29 16:06
Sender: nickmProject Admin


To be more specific about my first question: I do indeed see that the
test file generates events with EV_ET set when the backend supports
edge-triggered events and without EV_ET set when the backend doesn't
support edge-triggered events. What I'm hoping for is a unit test to
verify that the edge-triggered is in fact edge-triggered and not
level-triggered.


Date: 2008-05-29 15:59
Sender: nickmProject Admin


Neat work; I'd like to get something this into Libevent 2.0. A few
initial questions:
- How exactly does the test_et.c file test the edge-triggered behavior?
As near as I can tell,
the test ought to pass whether EV_ET works or not. What am I
missing?
- Is it really a good idea to have backends that do not support EV_ET
silently ignore it?
If writers are really hoping for edge-triggered behavior, won't they
be surprised when they
sometimes get it, and sometimes don't?



Date: 2008-05-20 21:56
Sender: val_kh


Target library version is 1.4.3-stable


Log in to comment.




Attached File ( 1 )

Filename Description Download
edge_triggered.patch Patch implementing it Download

Changes ( 4 )

Field Old Value Date By
status_id Open 2008-05-30 17:04 nickm
resolution_id None 2008-05-30 17:04 nickm
close_date - 2008-05-30 17:04 nickm
File Added 278477: edge_triggered.patch 2008-05-20 21:40 val_kh