atomicqueue: Improve performance on push operations
Submitted by sancane
Link to original bug (#772747)
Description
Created attachment 337414
Patch
We have detected that on big pipelines involving a great number of elements and processes competing to post messages on the bus, the amount of time spent on single push operations rapidly increase, we have detected that it can even reach a magnitude of seconds. This issue is caused because the current algorithm forces processes to wait until previous writers finalize sequentially. This patch allow faster writers to finalize the push operation without waiting for slower writers. Those slow processes are responsible of updating the read index so that processes can pop data at the right position, never beyond the index imposed by the slowest writer.
This issue might be related to the bug reported by Miguel París Díaz (https://bugzilla.gnome.org/show_bug.cgi?id=768668opened) who detected a long busy-waiting with gdb.
Patch 337414, "Patch":
0001-gstatomicqueue-Improve-performance-on-push-operation.patch