From: Peter Zijlstra <peterz@infradead.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: roland@redhat.com, efault@gmx.de, rjw@sisk.pl, jdike@addtoit.com,
mingo@elte.hu, user-mode-linux-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [patch] fix uml slowness caused by ptrace preemption bug on host
Date: Fri, 20 Mar 2009 09:19:29 +0100 [thread overview]
Message-ID: <1237537169.24626.29.camel@twins> (raw)
In-Reply-To: <E1LkQeU-00020Z-Be@pomaz-ex.szeredi.hu>
On Thu, 2009-03-19 at 23:23 +0100, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> This patch fixes bug #12208.
>
> This turned out to be not a scheduler regression, but an already
> existing problem in ptrace being triggered by subtle scheduler
> changes.
>
> The problem is this:
>
> - task A is ptracing task B
> - task B stops on a trace event
> - task A is woken up and preempts task B
> - task A calls ptrace on task B, which does ptrace_check_attach()
> - this calls wait_task_inactive(), which sees that task B is still on the runq
> - task A goes to sleep for a jiffy
> - ...
>
> Since UML does lots of the above sequences, those jiffies quickly add
> up to make it slow as hell.
>
> This patch solves this by not scheduling on preempt_enable() after
> ptrace_stop() has woken up the tracer.
Nice,.. however did you find this?
Ingo is looking at changing wait_task_inactive() to not be quite so
stupid. I'll let him respond with more details when he's done poking at
the code :-)
next prev parent reply other threads:[~2009-03-20 8:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 22:23 [patch] fix uml slowness caused by ptrace preemption bug on host Miklos Szeredi
2009-03-19 23:33 ` Roland McGrath
2009-03-20 8:05 ` Miklos Szeredi
2009-03-20 14:04 ` Oleg Nesterov
2009-03-20 13:51 ` Oleg Nesterov
2009-03-20 8:19 ` Peter Zijlstra [this message]
2009-03-20 8:27 ` Miklos Szeredi
2009-03-20 8:30 ` Ingo Molnar
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=1237537169.24626.29.camel@twins \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=roland@redhat.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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