Performance: Relax atomicity constraints for crash handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 25 Sep 2016 15:00:08 +0000 (11:00 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 25 Sep 2016 15:00:08 +0000 (11:00 -0400)
commit6212b6b6ae1db7f267bcbd017737ac6dfa9ffe16
tree7f947c4622b82ab128e4dab6a555f07967a25e99
parentd723e9056812fdee222f1156f45f7a43393c5863
Performance: Relax atomicity constraints for crash handling

Use a store rather than a cmpxchg() for the update of the
sequential commit counter. This speeds up commit. The downside
is that short race windows between the if() check to see if the
counter is larger than the new value and the update could result
in the counter going backwards, in unlikely preemption or signal
delivery scenarios.

Accept that we may lose a few events in a crash dump for the
benefit of tracing speed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/frontend_internal.h
This page took 0.025066 seconds and 4 git commands to generate.