[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150803143323.426ea2fc@gandalf.local.home>
Date: Mon, 3 Aug 2015 14:33:23 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Petr Mladek <pmladek@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Josh Triplett <josh@...htriplett.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>, Borislav Petkov <bp@...e.de>,
Michal Hocko <mhocko@...e.cz>, linux-mm@...ck.org,
Vlastimil Babka <vbabka@...e.cz>,
live-patching@...r.kernel.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating
the producer in the benchmark
On Tue, 28 Jul 2015 16:39:27 +0200
Petr Mladek <pmladek@...e.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()) {
> ring_buffer_reset(buffer);
>
> if (consumer) {
> @@ -393,11 +398,15 @@ static int ring_buffer_producer_thread(void *arg)
> }
>
> ring_buffer_producer();
> - if (kill_test)
> + if (break_test())
> goto out_kill;
>
> trace_printk("Sleeping for 10 secs\n");
> set_current_state(TASK_INTERRUPTIBLE);
> + if (break_test()) {
> + __set_current_state(TASK_RUNNING);
Move the setting of the current state to after the out_kill label.
-- Steve
> + goto out_kill;
> + }
> schedule_timeout(HZ * SLEEP_TIME);
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists