From: Avi Kivity <avi@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>,
Jim Keniston <jkenisto@us.ibm.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
ananth@in.ibm.com, Arnaldo Carvalho de Melo <acme@infradead.org>,
utrace-devel <utrace-devel@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Masami Hiramatsu <mhiramat@redhat.com>,
Maneesh Soni <maneesh@in.ibm.com>, Mark Wielaard <mjw@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)
Date: Wed, 27 Jan 2010 11:25:15 +0200 [thread overview]
Message-ID: <4B60067B.4060708@redhat.com> (raw)
In-Reply-To: <20100127090824.GA23570@elte.hu>
On 01/27/2010 11:08 AM, Ingo Molnar wrote:
>
>> I see it exactly the opposite. Only a very small minority of cases will
>> have such severe memory corruption that tracing will fall apart because of
>> random writes to memory; especially on 64-bit where the address space is
>> sparse. On the other hand, knowing that the cost is a few dozen cycles
>> rather than a thousand or so means that you can trace production servers
>> running full loads without worrying about whether tracing will affect
>> whatever it is you're trying to observe.
>>
>> I'm not against slow reliable tracing, but we shouldn't ignore the need for
>> speed.
>>
> I havent seen a conscise summary of your points in this thread, so let me
> summarize it as i've understood them (hopefully not putting words into your
> mouth): AFAICS you are arguing for some crazy fragile architecture-specific
> solution that traps INT3 into ring3 just to shave off a few cycles, and then
> use user-space state to trace into.
>
That's a good summary, except for the words "crazy fragile", "trap INT3
into ring3" and "a few cycles".
Instead of using int 3, put a jump instruction in the program. This
shaves a lot more than a few cycles.
> If so then you ignore the obvious solution to _that_ problem: dont use INT3 at
> all, but rebuild (or re-JIT) your program with explicit callbacks. It's _MUCH_
> faster than _any_ breakpoint based solution - literally just the cost of a
> function call (or not even that - i've written very fast inlined tracers -
> they do rock when it comes to performance). Problem solved and none of the
> INT3 details matters at all.
>
However did I not think of that? Yes, and let's rip off kprobes tracing
from the kernel, we can always rebuild it.
Well, I'm observing an issue in a production system now. I may not want
to take it down, or if I take it down I may not be able to observe it
again as the problem takes a couple of days to show up, or I may not
have the full source, or it takes 10 minutes to build and so an
iterative edit/build/run cycle can stretch for hours.
Adding a vma to a running program is very unlikely to affect it. If the
program makes random accesses to memory, it will likely segfault very
quickly before we ever get to trace it.
> INT3 only matters to _transparent_ probing, and for that, the cost of INT3 is
> almost _by definition_ less important than the fact that we can do transparent
> tracing. If performance were the overriding issue they'd use dedicated
> callbacks - and the INT3 technique wouldnt matter at all.
>
INT3 isn't transparent. The only thing that comes close to full
transparency is hardware breakpoints. So we have a tradeoff between
transparency and speed, and except for the wierdest bugs, this level of
transparency won't be needed.
> ( Also, just like we were able to extend the kprobes code with more and more
> optimizations, the same can be done with any user-space probing as well, to
> make it faster. But at the core of it has to be a sane design that is
> transparent and controlled by the kernel, so that it has the option to apply
> more and more otimizations - yours isnt such and its limitations are
> designed-in.
No design is fully transparent, and I don't see why my design can't be
controlled by the kernel?
> Which is neither smart nor useful. )
>
This style of arguing is neither smart or useful as well.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2010-01-27 9:27 UTC|newest]
Thread overview: 163+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 12:25 [RFC] [PATCH 0/7] UBP, XOL and Uprobes Srikar Dronamraju
2010-01-11 12:25 ` [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP) Srikar Dronamraju
2010-01-14 11:08 ` Peter Zijlstra
2010-01-14 19:46 ` Jim Keniston
2010-01-15 9:02 ` Peter Zijlstra
2010-01-15 21:07 ` Jim Keniston
2010-01-15 21:49 ` Peter Zijlstra
2010-01-16 0:58 ` Jim Keniston
2010-01-16 10:33 ` Peter Zijlstra
2010-01-17 0:12 ` Bryan Donlan
2010-01-18 7:37 ` Peter Zijlstra
2010-01-17 14:37 ` Avi Kivity
2010-01-15 9:03 ` Peter Zijlstra
2010-01-15 9:38 ` Ananth N Mavinakayanahalli
2010-01-15 9:50 ` Peter Zijlstra
2010-01-15 10:10 ` Ananth N Mavinakayanahalli
2010-01-15 10:13 ` Peter Zijlstra
2010-01-15 10:22 ` Ananth N Mavinakayanahalli
2010-01-15 10:56 ` Peter Zijlstra
2010-01-15 11:02 ` Peter Zijlstra
2010-01-15 21:19 ` Jim Keniston
2010-01-17 14:39 ` Avi Kivity
2010-01-17 14:52 ` Peter Zijlstra
2010-01-17 14:56 ` Avi Kivity
2010-01-17 15:01 ` Peter Zijlstra
2010-01-20 12:55 ` Pavel Machek
2010-01-17 14:59 ` Avi Kivity
2010-01-17 15:03 ` Peter Zijlstra
2010-01-17 19:33 ` Avi Kivity
2010-01-18 7:45 ` Peter Zijlstra
2010-01-18 11:01 ` Avi Kivity
2010-01-18 11:44 ` Peter Zijlstra
2010-01-18 12:01 ` Avi Kivity
2010-01-18 12:06 ` Peter Zijlstra
2010-01-18 12:09 ` Avi Kivity
2010-01-18 12:13 ` Pekka Enberg
2010-01-18 12:17 ` Avi Kivity
2010-01-18 12:24 ` Peter Zijlstra
2010-01-18 12:24 ` Pekka Enberg
2010-01-18 12:44 ` Srikar Dronamraju
2010-01-18 12:51 ` Pekka Enberg
2010-01-18 12:53 ` Avi Kivity
2010-01-18 12:57 ` Pekka Enberg
2010-01-18 13:06 ` Avi Kivity
2010-01-18 22:15 ` Jim Keniston
2010-01-19 8:07 ` Avi Kivity
2010-01-19 17:47 ` Jim Keniston
2010-01-19 18:06 ` Frederic Weisbecker
2010-01-20 6:36 ` Srikar Dronamraju
2010-01-20 10:51 ` Frederic Weisbecker
2010-01-20 19:31 ` Masami Hiramatsu
2010-01-20 9:43 ` Avi Kivity
2010-01-20 9:57 ` Peter Zijlstra
2010-01-20 12:22 ` Avi Kivity
2010-01-27 8:24 ` Ingo Molnar
2010-01-27 8:35 ` Avi Kivity
2010-01-27 9:08 ` Ingo Molnar
2010-01-27 9:25 ` Avi Kivity [this message]
2010-01-27 10:23 ` Ingo Molnar
2010-02-07 13:47 ` Avi Kivity
2010-01-20 10:45 ` Srikar Dronamraju
2010-01-20 12:23 ` Avi Kivity
2010-01-20 18:31 ` Andi Kleen
2010-01-20 19:34 ` Jim Keniston
2010-01-20 19:58 ` Andi Kleen
2010-01-20 20:28 ` Jim Keniston
2010-01-18 13:05 ` Peter Zijlstra
2010-01-18 13:34 ` Mark Wielaard
2010-01-18 19:49 ` Jim Keniston
2010-01-18 15:43 ` Ananth N Mavinakayanahalli
2010-01-18 16:52 ` Avi Kivity
2010-01-18 17:10 ` Ananth N Mavinakayanahalli
2010-01-18 12:14 ` Peter Zijlstra
2010-01-18 12:37 ` Avi Kivity
2010-01-18 13:15 ` Peter Zijlstra
2010-01-18 13:33 ` Avi Kivity
2010-01-18 13:34 ` K.Prasad
2010-01-20 15:57 ` Mel Gorman
2010-01-20 18:32 ` Andi Kleen
2010-01-18 11:45 ` Peter Zijlstra
2010-01-11 12:25 ` [RFC] [PATCH 2/7] x86 support for UBP Srikar Dronamraju
2010-01-11 12:25 ` [RFC] [PATCH 3/7] Execution out of line (XOL) Srikar Dronamraju
2010-01-14 11:08 ` Peter Zijlstra
2010-01-14 22:43 ` Jim Keniston
2010-01-15 9:07 ` Peter Zijlstra
2010-01-15 11:12 ` Srikar Dronamraju
2010-01-15 20:18 ` Jim Keniston
2010-01-11 12:25 ` [RFC] [PATCH 4/7] Uprobes Implementation Srikar Dronamraju
2010-01-12 2:01 ` Paul E. McKenney
2010-01-12 8:21 ` Srikar Dronamraju
2010-01-12 5:36 ` Frederic Weisbecker
2010-01-12 8:14 ` Ananth N Mavinakayanahalli
2010-01-13 0:53 ` Jim Keniston
2010-01-14 11:12 ` Peter Zijlstra
2010-01-12 8:54 ` Srikar Dronamraju
2010-01-14 11:09 ` Peter Zijlstra
2010-01-14 22:49 ` Jim Keniston
2010-01-15 9:10 ` Peter Zijlstra
2010-01-15 9:26 ` Frank Ch. Eigler
2010-01-15 9:35 ` Peter Zijlstra
2010-01-15 13:10 ` Frank Ch. Eigler
2010-01-15 13:25 ` Peter Zijlstra
2010-01-15 13:38 ` Frank Ch. Eigler
2010-01-15 13:47 ` Peter Zijlstra
2010-01-15 14:00 ` Frank Ch. Eigler
2010-01-15 14:06 ` Peter Zijlstra
2010-01-15 14:22 ` Frank Ch. Eigler
2010-01-15 14:40 ` Peter Zijlstra
2010-01-15 14:20 ` Srikar Dronamraju
2010-01-15 14:25 ` Peter Zijlstra
2010-01-15 23:11 ` Jim Keniston
2010-01-16 15:50 ` Frank Ch. Eigler
2010-01-15 10:26 ` Srikar Dronamraju
2010-01-15 10:33 ` Peter Zijlstra
2010-01-15 11:05 ` Maneesh Soni
2010-01-15 11:12 ` Peter Zijlstra
2010-01-15 11:18 ` Peter Zijlstra
2010-01-15 22:27 ` Jim Keniston
2010-01-15 23:44 ` Jim Keniston
2010-01-16 10:04 ` Peter Zijlstra
2010-01-15 13:08 ` Srikar Dronamraju
2010-01-15 13:16 ` Peter Zijlstra
2010-01-15 13:38 ` Peter Zijlstra
2010-01-11 12:25 ` [RFC] [PATCH 5/7] X86 Support for Uprobes Srikar Dronamraju
2010-01-14 11:13 ` Peter Zijlstra
2010-01-14 23:07 ` Jim Keniston
2010-01-11 12:26 ` [RFC] [PATCH 6/7] Uprobes Documentation Srikar Dronamraju
2010-01-11 12:26 ` [RFC] [PATCH 7/7] Ftrace plugin for Uprobes Srikar Dronamraju
2010-01-12 4:54 ` Frederic Weisbecker
2010-01-12 5:08 ` Steven Rostedt
2010-01-12 5:44 ` Frederic Weisbecker
2010-01-12 19:12 ` Tim Bird
2010-01-13 21:58 ` Masami Hiramatsu
2010-01-13 22:12 ` Masami Hiramatsu
2010-01-13 23:36 ` Steven Rostedt
2010-01-12 18:54 ` Frank Ch. Eigler
2010-01-12 22:00 ` Masami Hiramatsu
2010-01-12 22:15 ` Frank Ch. Eigler
2010-01-12 22:30 ` Masami Hiramatsu
2010-01-14 11:23 ` Peter Zijlstra
2010-01-14 11:29 ` Peter Zijlstra
2010-01-14 12:16 ` Mark Wielaard
2010-01-14 12:19 ` Peter Zijlstra
2010-01-14 11:35 ` Frederic Weisbecker
2010-01-14 11:43 ` Peter Zijlstra
2010-01-14 12:23 ` Frederic Weisbecker
2010-01-14 12:29 ` Peter Zijlstra
2010-01-18 13:00 ` Frederic Weisbecker
2010-01-11 14:35 ` [RFC] [PATCH 0/7] UBP, XOL and Uprobes Masami Hiramatsu
2010-01-11 22:59 ` Jim Keniston
2010-01-22 7:02 ` [RFC] [PATCH 0/7] UBP, XOL and Uprobes [ Summary of Comments and actions to be taken ] Srikar Dronamraju
2010-01-22 7:24 ` Ananth N Mavinakayanahalli
2010-01-22 10:47 ` Peter Zijlstra
2010-01-27 6:53 ` Peter Zijlstra
2010-01-27 8:24 ` Peter Zijlstra
2010-01-22 18:06 ` Peter Zijlstra
2010-01-22 18:36 ` Masami Hiramatsu
2010-01-22 23:55 ` Jim Keniston
-- strict thread matches above, loose matches on Subject: below --
2010-01-16 23:48 [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP) Jim Keniston
2010-01-18 7:23 ` Peter Zijlstra
2010-01-18 15:58 ` Masami Hiramatsu
2010-01-18 19:21 ` Jim Keniston
2010-01-18 21:20 ` Masami Hiramatsu
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=4B60067B.4060708@redhat.com \
--to=avi@redhat.com \
--cc=acme@infradead.org \
--cc=ananth@in.ibm.com \
--cc=fweisbec@gmail.com \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maneesh@in.ibm.com \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=mjw@redhat.com \
--cc=penberg@cs.helsinki.fi \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=utrace-devel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox