From: Oleg Nesterov <oleg@redhat.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Scott James Remnant <scott@canonical.com>,
Roland McGrath <roland@redhat.com>, Ingo Molnar <mingo@elte.hu>,
Casey Dahlin <cdahlin@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Randy Dunlap <randy.dunlap@oracle.com>,
Davide Libenzi <davidel@xmailserver.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [RESEND][RFC PATCH v2] waitfd
Date: Wed, 2 Mar 2011 14:55:03 +0100 [thread overview]
Message-ID: <20110302135503.GB9838@redhat.com> (raw)
In-Reply-To: <AANLkTimw5Z00uVsWYP0KGiQ8jDex9yYGNc61SG=9GsGj@mail.gmail.com>
On 03/02, Denys Vlasenko wrote:
>
> On Sat, Jan 10, 2009 at 4:57 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > We do not need multiple signals in queue if we want to reap multiple
> > zombies. Once we have a single SIGCHLD (reported by signalfd or
> > whatever) we can do do_wait(WNOHANG) in a loop.
> >
> > Confused.
>
> I know I am terribly late for the party :)
>
> "do_wait(WNOHANG) in a loop" is a performance problem.
Yes.
> Oleg, do you remember that strace bug when it was swamped
> with gazillions of stop notifications from a multithreaded
> task, then by dealing with them one-by-one it was causing
> unfairness and ultimately "this program never finishes
> when run under strace" bug?
Yes. But, iirc, this was not connected to the performance problems
with do_wait(). The problem was, strace did a single do_wait()
instead of wait-them-all.
> And another typical nuisance that running multithreaded
> stuff under strace is much slower, even with -e option
> which limits the set of decoded syscalls?
IIUC, this is also because strace is single-threaded, I mean it
doesn't scale well.
> Having waitfd would help both cases: strace can gulp
> a lot of waitpid notifications in one go, and
> batch process them.
Perhaps.
I do not know how much do_wait() contributes to the slowness
though. And it is not exactly clear how we can implement the
"fast" waitfd.
For example, this patch (iirc!) just calls do_wait() in a loop.
I doubt very much it can really help to improve the performance.
Oh. Can't resist. The real problem is that ptrace API should
not be per-thread, and it should not use wait() at all. But
this is offtopic.
Oleg.
prev parent reply other threads:[~2011-03-02 14:03 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 18:11 [RFC PATCH v2] waitfd Casey Dahlin
2009-01-06 18:27 ` Alan Cox
2009-01-06 18:31 ` Randy Dunlap
2009-01-06 18:45 ` Casey Dahlin
2009-01-06 18:50 ` Randy Dunlap
2009-01-06 18:48 ` Andi Kleen
2009-01-06 19:07 ` [RESEND][RFC " Casey Dahlin
2009-01-07 12:34 ` Ingo Molnar
2009-01-07 13:05 ` Casey Dahlin
2009-01-07 15:00 ` Ingo Molnar
2009-01-07 17:19 ` Oleg Nesterov
2009-01-07 17:24 ` Ingo Molnar
2009-01-07 17:52 ` Davide Libenzi
2009-01-07 20:38 ` Casey Dahlin
2009-01-10 14:47 ` Scott James Remnant
2009-01-10 21:14 ` Casey Dahlin
2009-01-10 21:20 ` Scott James Remnant
2009-01-10 22:08 ` Casey Dahlin
2009-01-10 22:31 ` Oleg Nesterov
2009-01-10 22:37 ` Casey Dahlin
2009-01-10 22:46 ` Oleg Nesterov
2009-01-07 20:53 ` Roland McGrath
2009-01-07 20:58 ` Ingo Molnar
2009-01-07 21:05 ` Davide Libenzi
2009-01-07 21:50 ` Ingo Molnar
2009-01-07 21:02 ` Ulrich Drepper
2009-01-08 14:32 ` Oleg Nesterov
2009-01-08 19:35 ` Roland McGrath
2009-01-08 20:36 ` Casey Dahlin
2009-01-08 21:39 ` Oleg Nesterov
2009-01-10 14:52 ` Scott James Remnant
2009-01-10 16:19 ` Oleg Nesterov
2009-01-10 17:09 ` Scott James Remnant
2009-01-10 18:21 ` Oleg Nesterov
2009-01-10 18:46 ` Scott James Remnant
2009-01-10 14:50 ` Scott James Remnant
2009-01-10 21:20 ` Casey Dahlin
2009-01-08 22:04 ` Michael Kerrisk
2009-01-10 14:09 ` Scott James Remnant
2009-01-10 14:45 ` Scott James Remnant
2009-01-10 15:57 ` Oleg Nesterov
2009-01-10 17:07 ` Scott James Remnant
2009-01-10 18:13 ` Oleg Nesterov
2009-01-10 20:13 ` Scott James Remnant
2009-01-10 22:24 ` Oleg Nesterov
2009-01-10 23:14 ` Davide Libenzi
2009-01-10 22:25 ` Casey Dahlin
2009-01-10 23:11 ` Davide Libenzi
2011-03-02 1:37 ` Denys Vlasenko
2011-03-02 13:55 ` Oleg Nesterov [this message]
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=20110302135503.GB9838@redhat.com \
--to=oleg@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=cdahlin@redhat.com \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=randy.dunlap@oracle.com \
--cc=roland@redhat.com \
--cc=scott@canonical.com \
--cc=vda.linux@googlemail.com \
/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.