mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] providing epoll support for mldonkey


From: Felix von Leitner
Subject: [Mldonkey-users] providing epoll support for mldonkey
Date: Fri, 9 May 2003 01:19:47 +0200
User-agent: Mutt/1.4.1i

Hi!

I just had a look at mldonkey cvs to see whether I could integrate epoll
support into mldonkey.  epoll is a Linux 2.5 API that is like poll but
much more efficient.

The speed improvement comes from two factors:

  - you don't push the whole array to the kernel all the time, but you
    only notify it of new events per file descriptor.

  - the list of events you get back contain only fds with events.

Currently mldonkey calls poll by dynamically building the pollfd struct
array from an ocaml list/struct/whatever.  This negates most of the
possible efficiency gains from epoll.

Since all faster-than-epoll APIs basically work like that, I propose
changing the internal mldonkey API so that all mldonkey routines that
modify the event list call some stub function as well.  That way it is
possible to not construct the pollfd array from scratch for each poll
call.  I can't guarantee anything but mldonkey should speed up
dramatically from epoll (or kqueue, the BSD equivalent), it's exactly
the target audience for these facilities.

Felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]