[PATCH v3 2/2] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-09-07 Thread Petr Mladek
The commit b44754d8262d3aab8 ("ring_buffer: Allow to exit the ring buffer benchmark immediately") added a hack into ring_buffer_producer() that set @kill_test when kthread_should_stop() returned true. It improved the situation a lot. It stopped the kthread in most cases because the producer spent

[PATCH v3 2/2] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-09-07 Thread Petr Mladek
The commit b44754d8262d3aab8 ("ring_buffer: Allow to exit the ring buffer benchmark immediately") added a hack into ring_buffer_producer() that set @kill_test when kthread_should_stop() returned true. It improved the situation a lot. It stopped the kthread in most cases because the producer spent