Performance: Relax atomicity constraints for crash handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 18 Sep 2016 04:25:58 +0000 (00:25 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 24 Sep 2016 14:56:12 +0000 (10:56 -0400)
commit16ec84c8bd34ce34dd59a9052e7a24eaa0f427f5
treef73e0837238106d8d0275422d881ae39739c7d92
parent8db078dccf54f56edbcbd20cff2430b5e7540801
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>
libringbuffer/frontend_internal.h
This page took 0.024843 seconds and 4 git commands to generate.