[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0809222335400.26011@gandalf.stny.rr.com>
Date: Mon, 22 Sep 2008 23:43:59 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
cc: Roland Dreier <rdreier@...co.com>,
Masami Hiramatsu <mhiramat@...hat.com>,
Martin Bligh <mbligh@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
darren@...art.com, "Frank Ch. Eigler" <fche@...hat.com>,
systemtap-ml <systemtap@...rces.redhat.com>
Subject: Re: Unified tracing buffer
On Mon, 22 Sep 2008, Linus Torvalds wrote:
>
>
> On Mon, 22 Sep 2008, Roland Dreier wrote:
> >
> > Just like Einstein said, it really seems to me that the order of things
> > depends on your frame of reference.
>
> Heh. Yes. In general, there is no single ordering unless you actually use
> a serializing lock on all CPU's involved.
>
> And exactly as in the theory of relativity, two people on different CPU's
> can actually validly _disagree_ about the ordering of the same event.
> There are things that act as "light-cones" and are borders for what
> everybody can agree on, but basically, in the absence of explicit locks,
> it is very possible that no such thing as "ordering" may even exist.
>
> Now, an atomic increment on a single counter obviously does imply *one*
> certain ordering, but it really only defines the ordering of that counter
> itself. It does not at all necessarily imply any ordering on the events
> that go on around the counter in other unrelated cachelines.
>
> Which is exactly why even a global counter in no way orders "events" in
> general, unless those events have something else that does so.
Hmm, I've been pretty spoiled by x86 mostly ording things correctly, and
the not x86 boxes I've used has mostly been UP.
But, with that, with a global atomic counter, and the following trace:
cpu 0: trace_point_a
cpu 1: trace_point_c
cpu 0: trace_point_b
cpu 1: trace_point_d
Could the event a really come after event d, even though we already hit
event b?
But I guess you are stating the fact that what the computer does
internally, no one really knows. Without the help of real memory barriers,
ording of memory accesses is mostly determined by tarot cards.
But basically, the perceived result of assembly commands is suppose to be
accurate at the user level. The traces that I've used not only shows the
order (or perceived order) of events, but also the output of the corrupted
data when the race happens. Usually with the two together, you can pretty
much guarantee that the traced events actually did occur in the order
presented.
But without some perceived accurate ording, even when you do see the
corrupted data, the events can easily be misleading, even on an arch that
usually orders the events as seen by the user.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists