Re: [PATCH -tip] x86: atomic64: inline atomic64_read()

From: Ingo Molnar
Date: Fri Jul 03 2009 - 17:41:27 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> Do we actually _have_ any performance-critical 64-bit counters
> that have monotonicity guarantees? I have no idea. I'm just
> throwing out the notion.

Due to the 'counter value flipping' we do on perfcounters for
certain workloads (attr.inherit_stat=1 counters - inherited counters
that neverheless provide precise per thread readouts - not just
precise summaries), the monotonicity assumption is not generally
true anymore.

But it would be nice if Eric could measure your suggested primitive,
just that we see how many cycles we are talking about. I suspect the
biggest difference would be a many-readers testcase - but that wont
normally happen on perfcounters as the counters typically get read
only from a single thread of executin.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/