From: Davide Libenzi <davidel@xmailserver.org>
To: Valdis.Kletnieks@vt.edu
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
mm-commits@vger.kernel.org
Subject: Re: mmotm 2009-02-14-00-49 uploaded -epoll busted.
Date: Tue, 17 Feb 2009 10:31:07 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.1.10.0902171023400.21510@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <7379.1234881458@turing-police.cc.vt.edu>
On Tue, 17 Feb 2009, Valdis.Kletnieks@vt.edu wrote:
> On Sat, 14 Feb 2009 00:51:41 PST, akpm@linux-foundation.org said:
> > The mm-of-the-moment snapshot 2009-02-14-00-49 has been uploaded to
>
> The epoll patch series breaks nscd in some odd way. After it's started
> in the /etc/rc* scripts, the rest of boot proceeds very slowly, smells like
> nscd calls are hitting timeouts. Boot time went from ~1 minute to ~10 mins.
>
> nscd is Fedora Rawhide nscd-2.9.90-3.x86_64, in case that matters...
>
> Also, the series isn't bisectable right where it matters most, complaining
> about implicit definitions of wake_up_nested...
>
> epoll-keyed-wakeups-v2-add-__wake_up_locked_key-and-__wake_up_sync_key.patch
> epoll-keyed-wakeups-v2-introduce-new-_poll-wakeup-macros.patch GOOD
> epoll-keyed-wakeups-v3-introduce-new-_poll-wakeup-macros.patch BISECT BUSTED
> epoll-keyed-wakeups-v2-make-sockets-use-keyed-wakeups.patch
> epoll-keyed-wakeups-v2-teach-epoll-about-hints-coming-with-the-wakeup-key.patch
> epoll-keyed-wakeups-v2-teach-epoll-about-hints-coming-with-the-wakeup-key-update.patch BAD
Alright, I took a peek at nscd and noticed it waits only for RDNORM.
Inside the socket code, the full flags computation is performed inside the
poll function, and ATM socket code has simple signaling of IN/OUT/ERR. We
could changethe socket code to allow more fine grained event signaling,
but IMO is not worth it. Epoll ends up calling the device poll anyway, and
since this is an optimization patch, a simple change to post a full IN/OUT
mask is enough.
Andrew, the patch below replaced the one you have under the name:
epoll-keyed-wakeups-v2-make-sockets-use-keyed-wakeups.patch
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
- Davide
---
net/core/sock.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: linux-2.6.mod/net/core/sock.c
===================================================================
--- linux-2.6.mod.orig/net/core/sock.c 2009-02-17 10:14:56.000000000 -0800
+++ linux-2.6.mod/net/core/sock.c 2009-02-17 10:21:43.000000000 -0800
@@ -1630,7 +1630,7 @@ static void sock_def_error_report(struct
{
read_lock(&sk->sk_callback_lock);
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible(sk->sk_sleep);
+ wake_up_interruptible_poll(sk->sk_sleep, POLLERR);
sk_wake_async(sk, SOCK_WAKE_IO, POLL_ERR);
read_unlock(&sk->sk_callback_lock);
}
@@ -1639,7 +1639,8 @@ static void sock_def_readable(struct soc
{
read_lock(&sk->sk_callback_lock);
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible_sync(sk->sk_sleep);
+ wake_up_interruptible_sync_poll(sk->sk_sleep, POLLIN |
+ POLLRDNORM | POLLRDBAND);
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
read_unlock(&sk->sk_callback_lock);
}
@@ -1653,7 +1654,8 @@ static void sock_def_write_space(struct
*/
if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) {
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible_sync(sk->sk_sleep);
+ wake_up_interruptible_sync_poll(sk->sk_sleep, POLLOUT |
+ POLLWRNORM | POLLWRBAND);
/* Should agree with poll, otherwise some programs break */
if (sock_writeable(sk))
next prev parent reply other threads:[~2009-02-17 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200902140851.n1E8pfIN030501@imap1.linux-foundation.org>
2009-02-17 14:28 ` mmotm 2010-02-14-00-49 uploaded - synaptics breakage Valdis.Kletnieks
2009-02-17 14:37 ` mmotm 2009-02-14-00-49 uploaded -epoll busted Valdis.Kletnieks
2009-02-17 18:31 ` Davide Libenzi [this message]
2009-02-17 21:01 ` Valdis.Kletnieks
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=alpine.DEB.1.10.0902171023400.21510@alien.or.mcafeemobile.com \
--to=davidel@xmailserver.org \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.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
all inboxes | Powered by JetHome®