Re: The thundering herd like problem when multi epolls on one fd

From: Hagen Paul Pfeifer
Date: Sat Jan 14 2012 - 10:57:20 EST


* Eric Dumazet | 2012-01-14 14:20:47 [+0100]:

>What happens if the awaken thread does not consume the event, and prefer
>to exit ?
>
>If several threads are doing select()/poll()/epoll() on a shared fd,
>they _all_ must be notified the fd is ready, as manpages claim.
>

And if it is intended? Signaled via a new epoll_ctl() epoll_event flag? E.g.
EPOLLEXCLUSIVE

>Doing otherwise would require the prior consent of the user, using a
>special flag for example, and documentation.

Oops, yes. A fanout like mechanism _may be_ superior, but I think tests will
show some improvements anyway.

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