Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-09-07 Thread Oleg Nesterov
Sorry, I didn't read these emails, and I never looked at this code... Can't understand what are you talking about but a minor nit anyway ;) On 09/04, Petr Mladek wrote: > > + __set_current_state(TASK_RUNNING); > if (!kthread_should_stop()) > wait_to_die(); I bet this

Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-09-07 Thread Oleg Nesterov
Sorry, I didn't read these emails, and I never looked at this code... Can't understand what are you talking about but a minor nit anyway ;) On 09/04, Petr Mladek wrote: > > + __set_current_state(TASK_RUNNING); > if (!kthread_should_stop()) > wait_to_die(); I bet this

Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-09-04 Thread Petr Mladek
On Mon 2015-08-03 14:33:23, Steven Rostedt wrote: > On Tue, 28 Jul 2015 16:39:27 +0200 > Petr Mladek wrote: > > > @@ -384,7 +389,7 @@ static int ring_buffer_consumer_thread(void *arg) > > > > static int ring_buffer_producer_thread(void *arg) > > { > > - while (!kthread_should_stop() &&

Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-09-04 Thread Petr Mladek
On Mon 2015-08-03 14:33:23, Steven Rostedt wrote: > On Tue, 28 Jul 2015 16:39:27 +0200 > Petr Mladek wrote: > > > @@ -384,7 +389,7 @@ static int ring_buffer_consumer_thread(void *arg) > > > > static int ring_buffer_producer_thread(void *arg) > > { > > - while

Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-08-03 Thread Steven Rostedt
On Tue, 28 Jul 2015 16:39:27 +0200 Petr Mladek wrote: > @@ -384,7 +389,7 @@ static int ring_buffer_consumer_thread(void *arg) > > static int ring_buffer_producer_thread(void *arg) > { > - while (!kthread_should_stop() && !kill_test) { > + while (!break_test()) { >

Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-08-03 Thread Steven Rostedt
On Tue, 28 Jul 2015 16:39:27 +0200 Petr Mladek pmla...@suse.com wrote: @@ -384,7 +389,7 @@ static int ring_buffer_consumer_thread(void *arg) static int ring_buffer_producer_thread(void *arg) { - while (!kthread_should_stop() !kill_test) { + while (!break_test()) {

[RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-07-28 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

[RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark

2015-07-28 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