From: Ingo Molnar <mingo@elte.hu>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: peterz@infradead.org, roland@redhat.com, efault@gmx.de,
rjw@sisk.pl, jdike@addtoit.com,
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:30:49 +0100 [thread overview]
Message-ID: <20090320083049.GA29471@elte.hu> (raw)
In-Reply-To: <E1Lka4M-0002za-FQ@pomaz-ex.szeredi.hu>
* Miklos Szeredi <miklos@szeredi.hu> wrote:
> On Fri, 20 Mar 2009, Peter Zijlstra wrote:
> > On Thu, 2009-03-19 at 23:23 +0100, Miklos Szeredi wrote:
> > >
> > > This patch solves this by not scheduling on preempt_enable() after
> > > ptrace_stop() has woken up the tracer.
> >
> > Nice,.. however did you find this?
>
> Ftrace helped a lot, it's a really cool tool :). I had to patch it
> with this, otherwise the timestamps would be totally off:
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index bd38c5c..557c2dd 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -108,7 +108,7 @@ u64 ring_buffer_time_stamp(int cpu)
>
> preempt_disable_notrace();
> /* shift to debug/test normalization and TIME_EXTENTS */
> - time = sched_clock() << DEBUG_SHIFT;
> + time = cpu_clock(cpu) << DEBUG_SHIFT;
> preempt_enable_no_resched_notrace();
Btw., based on your earlier report, the same is now possible in the
latest tracing tree via:
echo 1 > /debug/tracing/options/global_clock
Ingo
prev parent reply other threads:[~2009-03-20 8:32 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
2009-03-20 8:27 ` Miklos Szeredi
2009-03-20 8:30 ` Ingo Molnar [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=20090320083049.GA29471@elte.hu \
--to=mingo@elte.hu \
--cc=efault@gmx.de \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=peterz@infradead.org \
--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