From: Eric Dumazet <dada1@cosmosbay.com>
To: Davi Arnaut <davi@haxent.com.br>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Davide Libenzi <davidel@xmailserver.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 06:15:02 +0200 [thread overview]
Message-ID: <463C04C6.7000205@cosmosbay.com> (raw)
In-Reply-To: <463BC3CA.6050109@haxent.com.br>
Davi Arnaut a écrit :
> 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?
>
Yes it makes sense.
But... what happens if the thread that was chosen exits from the loop in
ep_poll() with res = -EINTR (because of signal_pending(current))
Me thinks in this case some ready events can wait forever (up to next
ep_poll_callback() or another thread enters ep_poll())
next prev parent reply other threads:[~2007-05-05 4:15 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 [this message]
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
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=463C04C6.7000205@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@linux-foundation.org \
--cc=davi@haxent.com.br \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox