From: Davi Arnaut <davi@haxent.com.br>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rfc: threaded epoll_wait thundering herd
Date: Sat, 05 May 2007 18:42:15 -0300 [thread overview]
Message-ID: <463CFA37.3020809@haxent.com.br> (raw)
In-Reply-To: <Pine.LNX.4.64.0705051155210.19104@alien.or.mcafeemobile.com>
Davide Libenzi wrote:
> On Fri, 4 May 2007, Davi Arnaut wrote:
>
>> Hi,
>>
>> If multiple threads are parked on epoll_wait (on a single epoll fd) and
>> events become available, epoll performs a wake up of all threads of the
>> poll wait list, causing a thundering herd of processes trying to grab
>> the eventpoll lock.
>>
>> This patch addresses this by using exclusive waiters (wake one). Once
>> the exclusive thread finishes transferring it's events, a new thread
>> is woken if there are more events available.
>>
>> Makes sense?
>
> Theorically, make sense. I said theorically because all the use
> epoll_wait MT use cases I've heard of, use a single thread that does the
> epoll_wait, and then dispatch to worker threads. So thundering herd is not
> in the picture. OTOH, it does not hurt either.
A google search turns up a few users. It also addresses some complaints
from Drepper.
> But, that code is completely changed with the new single-pass epoll delivery
> code that is in -mm. So, I'd either wait for that code to go in, or I
> (or you, if you like) can make a patch against -mm.
Fell free to update the patch for -mm and to include my signed-of-by.
Thanks.
--
Davi Arnaut
next prev parent reply other threads:[~2007-05-05 21:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070504225730.490334000@haxent.com.br>
2007-05-04 23:37 ` [PATCH] rfc: threaded epoll_wait thundering herd Davi Arnaut
2007-05-05 4:15 ` Eric Dumazet
2007-05-05 4:44 ` Linus Torvalds
2007-05-05 5:47 ` Eric Dumazet
2007-05-05 19:00 ` Davide Libenzi
2007-05-05 21:42 ` Davi Arnaut [this message]
2007-05-07 21:00 ` Ulrich Drepper
2007-05-07 21:34 ` Davi Arnaut
2007-05-07 22:19 ` Ulrich Drepper
2007-05-07 22:35 ` Davide Libenzi
2007-05-08 2:49 ` Ulrich Drepper
2007-05-08 3:56 ` Kyle Moffett
2007-05-08 4:35 ` Linus Torvalds
2007-05-08 6:30 ` Davide Libenzi
2007-05-07 23:15 ` Davi Arnaut
2007-05-08 2:32 ` Ulrich Drepper
2007-05-08 3:24 ` Davi Arnaut
2007-05-07 22:47 ` Davide Libenzi
2007-05-07 15:46 ` Chase Venters
2007-05-07 17:18 ` Davide Libenzi
2007-05-07 18:17 ` Chase Venters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=463CFA37.3020809@haxent.com.br \
--to=davi@haxent.com.br \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.