lkml.org 
[lkml]   [2006]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: accept()ing socket connections with level triggered epoll
On Wed, Apr 26, 2006 at 06:05:20PM -0600, kyle@pbx.org wrote:
> On Wed, Apr 26, 2006 at 03:14:16PM -0700, Davide Libenzi wrote:
> >
> > Correct, if it's LT you have to get the event because before returning from
> > epoll_wait(), the event is automatically re-armed if f_op->poll() returns it.
> > Can you post the *minimal* test code for this case?
> >
> > - Davide
> >
>
> I tried reducing the code I have to the minimum necessary to demonstrate the
> problem. It went away, I'm afraid. Since I'm already aware of a workaround
> (call accept in a loop until you get EAGAIN), I guess I'll just forget about
> it. Unfortunately I can't post the full code, not that you'd want to dig
> through all of it anyway.

Sorry, I misunderstood you the first time. I thought that it was *when*
your accept looped that you encountered the problem. If you need performance,
I *really* encourage you to loop on accept() as much as you can. Missing an
accept() and reading EAGAIN is cheap, while looping through all your event
loop is usually more expensive. In haproxy, I had performance problems 5
years ago, I could not get above 1500-2000 sessions/s because I was doing
one accept at a time. After putting a small "while" loop around, it
immediately jumped over 10000.

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-27 06:10    [W:0.041 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site