mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Noah Watkins <nwatkins@ittc.ku.edu>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org,
	"systemtap@sourceware.org" <systemtap@sourceware.org>
Subject: Re: [patch 0/1] extending low-level markers
Date: 07 Aug 2007 15:50:37 -0400	[thread overview]
Message-ID: <y0m4pjbxgxe.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <20070802195837.GD15216@ittc.ku.edu>

Noah Watkins <nwatkins@ittc.ku.edu> writes:

> [...]
> The locks are aquired and released in each _start and _end marker, so
> the equilibrium is not a issue.

But it becomes an issue should preemption, or control flow upset such
as an early return or recursion, occurs between the start and end
markers.

> A more sane example is the insertion of values into a histogram. Instead
> of the instrumenation point logging the values and having the histogram
> constructed during a post-process step, data structures implemented the
> histogrm are associated with the instrumenation point. The lock protects
> this structure in a more intuitive way than the interval example.

A better way may be to do what we do in systemtap scripts: in a
interval-start type probe, store the start value in a table indexed by
thread-id and nesting-level; in the interval-end type probe, find the
corresponding value, compute the difference (as appropriate), and
store the result only then into your long-term lookup table.  This
approach requires *no locks* to survive between start & end: the
probes remain atomic.

> I think most of problems involving non atomicity of the
> connection/disconnection of probes can be accomplished by good house
> keeping and settings things up in phases which insure consistency.

A marker callback can take shortcuts, I guess, if it allows itself to
make assumptions about the ways it can be called.

I scanned over the thread, but still haven't seen a specific argument
for extra marker-type annotations that would relate to this issue.
What tool would need to scan the available markers, and how would
extra information allow it to do its job?

- FChE

      reply	other threads:[~2007-08-07 19:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 21:57 nwatkins
2007-08-02 16:44 ` Mathieu Desnoyers
2007-08-02 18:32   ` Noah Watkins
2007-08-02 19:02     ` Mathieu Desnoyers
2007-08-02 19:31       ` Noah Watkins
2007-08-02 19:38         ` Mathieu Desnoyers
2007-08-02 19:58           ` Noah Watkins
2007-08-07 19:50             ` Frank Ch. Eigler [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=y0m4pjbxgxe.fsf@ton.toronto.redhat.com \
    --to=fche@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=nwatkins@ittc.ku.edu \
    --cc=systemtap@sourceware.org \
    /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®