From: Ingo Molnar <mingo@elte.hu>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Frank Ch. Eigler" <fche@redhat.com>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 0/2] Immediate Values - jump patching update
Date: Tue, 29 Apr 2008 14:08:27 +0200 [thread overview]
Message-ID: <20080429120827.GB31271@elte.hu> (raw)
In-Reply-To: <481674FA.4030306@zytor.com>
* H. Peter Anvin <hpa@zytor.com> wrote:
>> At least one complication though is that in the case of markers,
>> tracing parameter evaluation is itself conditional (and placed out of
>> the hot path due to -freorder-blocks). With your suggested kind of
>> assembly ("g" constraints for all the expressions), those expressions
>> would be evaluated unconditionally, just to make them live somewhere.
>> That unconditional evaluation can easily entail memory reads and
>> dependent arithmetic, which could swamp the savings of eliminating
>> the marker-style conditional branch.
>
> Well, it depends a bit on what kind of expressions you put in there.
> You don't really want to put *expressions* in there as much as you
> want to put *data* references in there, although, of course, if your
> have something like "foo->bar[baz]->quux" then it's easy to trip upon.
and that's exactly what was tripped upon in sched.o and analyzed.
Furthermore, the suggestion of doing this exclusively within the DWARF2
space - besides the not particularly minor complication of it not being
implemented yet - is:
- quite substantially complex on its own
- would make Linux instrumentation dependent on all sorts of DWARF2
details which we had our 'fun' with before. (I proffer that that's
more fragile than any code patching can ever be.)
- if done self-sufficiently (i.e. if a kernel image can be used to
trace things, which i believe any usable kernel tracer must offer),
it would, with the current debug info format, enlargen the kernel RAM
image with quite a substantial amount of unswappable kernel memory.
But i would not mind such a scheme at all (it is in essence SystemTap
integrated into the core kernel) - in fact if your scheme gets
implemented then the current marker facilities could be ported to that
scheme transparently.
So i dont see how it can be a loss to stick with the current markers for
the time being. If the super-optimized runtime patching in this thread
is deemed too fragile we simply wont do that and live with the (small)
runtime overhead that current markers have.
This is a sane plan IMO, basically all the instrumentation folks agree
with it (SystemTap, LTTNG, kprobes, ftrace), the scheduler folks agree
with it as well and we'd like to move on.
Ingo
next prev parent reply other threads:[~2008-04-29 12:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 3:34 Mathieu Desnoyers
2008-04-28 3:34 ` [patch 1/2] Immediate Values - jump liveliness Mathieu Desnoyers
2008-04-28 3:34 ` [patch 2/2] Markers - use imv_cond " Mathieu Desnoyers
2008-04-28 12:48 ` [patch 0/2] Immediate Values - jump patching update Ingo Molnar
2008-04-28 14:35 ` Mathieu Desnoyers
2008-04-28 17:21 ` H. Peter Anvin
2008-04-28 20:25 ` Ingo Molnar
2008-04-28 21:03 ` H. Peter Anvin
2008-04-28 22:11 ` Ingo Molnar
2008-04-28 22:25 ` H. Peter Anvin
2008-04-28 22:44 ` Ingo Molnar
2008-04-28 23:06 ` H. Peter Anvin
2008-04-29 0:47 ` Frank Ch. Eigler
2008-04-29 1:08 ` H. Peter Anvin
2008-04-29 12:08 ` Ingo Molnar [this message]
2008-05-14 14:53 ` Pavel Machek
2008-04-29 1:46 ` Mathieu Desnoyers
2008-04-29 2:07 ` H. Peter Anvin
2008-04-29 12:18 ` Mathieu Desnoyers
2008-04-29 15:35 ` H. Peter Anvin
2008-05-04 14:54 ` Mathieu Desnoyers
2008-05-04 21:05 ` H. Peter Anvin
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=20080429120827.GB31271@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=fche@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
/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®