Re: [Patch][RFC] epoll and half closed TCP connections

Davide Libenzi (davidel@xmailserver.org)
Sat, 12 Jul 2003 13:48:21 -0700 (PDT)


On Sat, 12 Jul 2003, Eric Varsanyi wrote:

> > > In a level triggered world this all just works because the read ready
> > > indication is driven back to the app as long as the socket state is half
> > > closed. The event driven epoll mechanism folds these two indications
> > > together and thus loses one 'edge'.
> >
> > Well then, use epoll's level-triggered mode. It's quite easy - it's
> > the default now. :)
>
> The problem with all the level triggered schemes (poll, select, epoll w/o
> EPOLLET) is that they call every driver and poll status for every call into
> the kernel. This appeared to be killing my app's performance and I verified
> by writing some simple micro benchmarks.

Look this is false for epoll. Given N fds inside the set and M hot/ready
fds, epoll scale O(M) and not O(N) (like poll/select). There's a huge
difference, expecially with real loads.

- Davide

-
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/