public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Theodore Tso <tytso@mit.edu>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	systemtap@sourceware.org,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: Re: [PATCH] simple dprobe like markers for the kernel
Date: Mon, 14 Jul 2008 22:03:00 -0000	[thread overview]
Message-ID: <1216072960.3378.65.camel@localhost.localdomain> (raw)
In-Reply-To: <487B7E37.9050600@redhat.com>

On Mon, 2008-07-14 at 12:26 -0400, Masami Hiramatsu wrote:
> Hi James,
> 
> James Bottomley wrote:
> > This is just an incremental update based on feedback.  The most
> > significant was that making the marker a compiler barrier will free the
> > inserter from worrying about the mark sliding around changes to named
> > variables (and thus having to worry about this in placement) at
> > practically zero optimisation cost.  I also updated the code to drop and
> > asm section instead of using the static variable scheme.  I also added
> > documentation and made the module loader ignore them (since modules
> > don't go through the vmlinux.lds transformations).
> 
> I'm very interested in your approach.
> 
> IMHO, as Aoki investigated, the overhead of markers is not so big
> unless we put a lot of them into kernel.

That's the case which I started from.  The point is that if passive
markers have a cost, we have to be very careful about placing them to
avoid the cost adding up.

>  And from "active"
> overhead point of view, it takes less than tens of nano-seconds,
> while kprobes takes hundreds of nano-seconds. Kprobe also has a
> limitation of probable points, it can't probe "__kprobes" marked
> functions. So, original markers still has advantages.

Yes ... the zero impact markers are completely dependent on the kprobes
overhead for activation ... on the other hand, one of the vendor
complaints is cost of activation of kprobes, so it's nicely tied into
solving that particular problem.

> However, your approach is also useful, especially for embedding
> thousands of markers in kernel or drivers.
> 
> So I think it's better to use both of them as the situation demands.

Certainly ... as I said to Ted, I'm not planning to replace the current
markers, just give a lightweight alternative.

> I just have one comment on its name. Since it doesn't trace
> anything, so I'd rather like notation() or note_mark() than
> trace_simple(). :-)

well ... the current markers code uses trace_mark as its base .. I was
just trying to fit into that scheme.

Also, don't rely on anything in this code yet ... that's why it's an
RFC; I'm still playing around with the section formats and the
information.  After more discussions with people, I'm actually coming to
the conclusion that dropping the address of the simple marker might be
very useful (in place of file and line).  It makes the marker section
need relocation, but it would also mean they could be used simply from
within the kernel as well.

James


      reply	other threads:[~2008-07-14 22:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1215638551.3444.39.camel__22002.9595810503$1215638656$gmane$org@localhost.localdomain>
2008-07-10  2:30 ` [RFC] " Frank Ch. Eigler
2008-07-10 13:51   ` James Bottomley
2008-07-10 14:23     ` Frank Ch. Eigler
2008-07-10 14:46       ` James Bottomley
2008-07-10 15:30         ` Theodore Tso
2008-07-10 15:57           ` James Bottomley
2008-07-10 18:20           ` Frank Ch. Eigler
2008-07-12 18:23           ` [PATCH] " James Bottomley
2008-07-12 20:05             ` [PATCH] systemtap: add parser for simple markers James Bottomley
2008-07-12 23:08               ` Frank Ch. Eigler
2008-07-14 16:28             ` [PATCH] simple dprobe like markers for the kernel Masami Hiramatsu
2008-07-14 22:03               ` James Bottomley [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=1216072960.3378.65.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=fche@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mhiramat@redhat.com \
    --cc=systemtap@sourceware.org \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).