Re: [ltt-dev] Re: [PATCH] LTT for 2.5.38 1/9: Core infrastructure

From: Ingo Molnar (
Date: Sun Sep 22 2002 - 17:55:06 EST

On Sun, 22 Sep 2002, bob wrote:

> > (this is in essence a moving spinlock at the tail of the trace buffer -
> > same problem.)
> No, we use lock-free atomic operations to reserve a place in the buffer
> to write the data. What happens is you attempt to atomic move the
> current index pointer forward. If you succeed then you have bought
> yourself that many data words in the queue. In the unlikely event you
> happened to collide with someone you perform the atomic operation again.

you have not understood what i have written.

what you do has the same (bad) effect as a global spinlock, it in essence
has the same cache effect as a constantly moving spinlock at the 'end' of
the trace buffer. Cachelines bounce between CPUs. Only completely per-CPU
trace buffers solve this problem.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Sep 23 2002 - 22:00:37 EST