Re: [PATCH] rfc: threaded epoll_wait thundering herd

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Davide Libenzi <davidel@...>
Cc: Davi Arnaut <davi@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Monday, May 7, 2007 - 11:46 am

On Sat, 5 May 2007, Davide Libenzi wrote:


*raises hand*

I'm working on event handling code for multiple projects right now, and my 
method of calling epoll_wait() is to do so from several threads. I've 
glanced at the epoll code but obviously haven't noticed the wake-all 
behavior... good to know. I suppose I'm going to have to hack around this 
problem by wrapping epoll_wait() calls in a mutex. That sucks - it means 
other threads won't be able to 'get ahead' by preparing their wait before 
it is their turn to dequeue events.

In any case, I think having multiple threads blocking on epoll_wait() is a 
much saner idea than one thread which then passes out events, so I must 
voice my support for fixing this case. Why this is the exception instead 
of the norm is a little baffling, but I've seen so many perverse things in 
multi-threaded code...


Thanks,
Chase
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] rfc: threaded epoll_wait thundering herd, Davi Arnaut, (Fri May 4, 7:37 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davide Libenzi, (Sat May 5, 3:00 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Chase Venters, (Mon May 7, 11:46 am)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davide Libenzi, (Mon May 7, 1:18 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Chase Venters, (Mon May 7, 2:17 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davi Arnaut, (Sat May 5, 5:42 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Ulrich Drepper, (Mon May 7, 5:00 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davide Libenzi, (Mon May 7, 6:47 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davi Arnaut, (Mon May 7, 5:34 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Ulrich Drepper, (Mon May 7, 6:19 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davi Arnaut, (Mon May 7, 7:15 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Ulrich Drepper, (Mon May 7, 10:32 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davi Arnaut, (Mon May 7, 11:24 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davide Libenzi, (Mon May 7, 6:35 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Ulrich Drepper, (Mon May 7, 10:49 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Davide Libenzi, (Tue May 8, 2:30 am)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Linus Torvalds, (Tue May 8, 12:35 am)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Kyle Moffett, (Mon May 7, 11:56 pm)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Eric Dumazet, (Sat May 5, 12:15 am)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Linus Torvalds, (Sat May 5, 12:44 am)
Re: [PATCH] rfc: threaded epoll_wait thundering herd, Eric Dumazet, (Sat May 5, 1:47 am)