|| ||Linus Torvalds <torvalds-AT-linux-foundation.org>|
|| ||Roland Dreier <rdreier-AT-cisco.com>|
|| ||Re: Unified tracing buffer|
|| ||Mon, 22 Sep 2008 20:26:29 -0700 (PDT)|
|| ||Masami Hiramatsu <mhiramat-AT-redhat.com>, Martin Bligh <mbligh-AT-google.com>, Linux Kernel Mailing List <linux-kernel-AT-vger.kernel.org>, Thomas Gleixner <tglx-AT-linutronix.de>, Mathieu Desnoyers <compudj-AT-krystal.dyndns.org>, Steven Rostedt <rostedt-AT-goodmis.org>, darren-AT-dvhart.com, "Frank Ch. Eigler" <fche-AT-redhat.com>, systemtap-ml <systemtap-AT-sources.redhat.com>|
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.
to post comments)