Dan, On Mon, Sep 15, 2008 at 3:08 AM, Dan Kegel <[EMAIL PROTECTED]> wrote:
> Howdy! > I've been an admirer of libevent since it was a wee lad, > but never had an excuse to try it out until now. > http://codereview.chromium.org/3202/patch/1/11 > is my attempt at using libevent to port a > simple tcp client socket class to linux. > This seems to work, but I notice it's making lots > of epoll_ctl calls to add and delete various things > even though the socket is always open. > > It occurs to me that libevent could reduce the number > of such system calls transparently by using > EPOLLET and caching readiness status in userspace. > There's already space for the data (in struct evepoll), > so this could be a very cheap change with no externally > visible difference other than lower cpu usage. > > I haven't tried it yet, wondered if anyone else has. > (This is different from earlier proposals like > http://osdir.com/ml/lisp.scheme.gambit/2005-08/msg00044.html > which did change epoll's interface to calling programs.) > - Dan > Looks like a great idea! This may be particularly useful, when working on demultiplexing of tens and hundred thousand of sockets with even more events, like e.g. curl-loader or ngnix are doing. Have you tried to benchmark it and see the gains? -- Truly, Robert Iakobashvili ...................................................................... www.ghotit.com Assistive technology that understands you ......................................................................
_______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users