#7 Support for Edge-Triggered behaviour

feature
closed-accepted
nobody
None
5
2008-05-30
2008-05-20
No

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.

Discussion

  • Valery Kholodkov

    Logged In: YES
    user_id=296306
    Originator: YES

    Target library version is 1.4.3-stable

     
  • Nick Mathewson

    Nick Mathewson - 2008-05-29

    Logged In: YES
    user_id=499
    Originator: NO

    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?

     
  • Nick Mathewson

    Nick Mathewson - 2008-05-29

    Logged In: YES
    user_id=499
    Originator: NO

    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.

     
  • Nick Mathewson

    Nick Mathewson - 2008-05-30

    Logged In: YES
    user_id=499
    Originator: NO

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

     
  • Nick Mathewson

    Nick Mathewson - 2008-05-30

    Logged In: YES
    user_id=499
    Originator: NO

    Committed to trunk; thanks!

     
  • Nick Mathewson

    Nick Mathewson - 2008-05-30
    • status: open --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks