On Wed, 2010-11-10 at 12:54 -0800, Luck, Tony wrote:
Hmm, I had this argument with Mathieu before, but I guess I mistakenly
let him win ;-)
I call "flight recorder" mode "overwrite" mode. Basically there's two
modes. They only have meaning when the ring buffer is full and a write
takes place.
1) produce/consumer mode - When the writer reaches the reader, all new
events are discarded. This means that you lose the latest events while
you keep older events around.
2) overwrite mode (flight recorder) - when the writer reaches the
reader, it pushes the reader forward, and writes the new events over the
old ones. This way, new events are always existent, where as old events
are lost.
1 is much easier to implement than 2, especially when doing it in a
lockless way.
I guess I should have fought harder to keep the terminology of
"overwrite" mode. This is the third time is the last week I had to
explain what "flight recorder" mode was. Where as, overwrite mode was a
bit more obvious.
-- Steve
--