Re: and nicer too - Re: [PATCH] epoll more scalable than poll

Martin Waitz
2002-10-29T12:53:00Z

[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]

hi :)

On Mon, Oct 28, 2002 at 04:08:04PM -0800, Davide Libenzi wrote:
> > The code you wrote has the standard epoll race condition. If the file
> > descriptor 's' becomes readable before the call to sys_epoll_ctl,
> > sys_epoll_wait() will never return the socket. The connection will hang
> > and the file descriptor will effectively leak.
>
> So, please don't use :
>
> free((void *) rand());
>
> free() is flawed !! Be warned !!

this is not a good argument.
the situation above is real, and a new poll mechanism should handle it.
(the kevent paper has a nice section about this problem)
why put the burden on the application, if the kernel already has
all information needed?

every api should be build to cause the least astonishment to its users.
epoll is much more scalable than standard poll, yet i don't think
it's a nice api.

you should at least build it in a way that it can be extended later.
it would be sad if one had to add another syscall to build an
better notification mechanism later.

the unified event mechanism introduced in bsd is a good example imho.
we should build something that is similar useful for applications.

don't take me wrong, i greatly appreciate the work put in epoll,
i just think it's far from being perfect at the moment.

--
CU, / Friedrich-Alexander University Erlangen, Germany
Martin Waitz // [Tali on IRCnet] [tali.home.pages.de] _________
______________/// - - - - - - - - - - - - - - - - - - - - ///
dies ist eine manuell generierte mail, sie beinhaltet //
tippfehler und ist auch ohne grossbuchstaben gueltig. /
-
Wer bereit ist, grundlegende Freiheiten aufzugeben, um sich
kurzfristige Sicherheit zu verschaffen, der hat weder Freiheit
noch Sicherheit verdient.
Benjamin Franklin (1706 - 1790)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]