Re: [for-next][PATCH 2/2] tracing: Clean up scheduling in trace_wakeup_test_thread()
From: Peter Zijlstra
Date: Thu Oct 09 2014 - 05:39:41 EST
On Wed, Oct 08, 2014 at 09:10:12PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> Peter's new debugging tool triggers when tasks exit with !TASK_RUNNING.
> The code in trace_wakeup_test_thread() also has a single schedule() call
> that should be encompassed by a loop.
>
> This cleans up the code a little to make it a bit more robust and
> also makes the return exit properly with TASK_RUNNING.
>
> Link: http://lkml.kernel.org/p/20141008135216.76142204@xxxxxxxxxxxxxxxxxx
>
> Reported-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
Acked-by: Peter Zijlstra <peterz@xxxxxxxxxxxxxx>
> ---
> kernel/trace/trace_selftest.c | 47 +++++++++++++++++++++++++++----------------
> 1 file changed, 30 insertions(+), 17 deletions(-)
>
> diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
> index 5ef60499dc8e..593f52b73551 100644
> --- a/kernel/trace/trace_selftest.c
> +++ b/kernel/trace/trace_selftest.c
> @@ -1025,6 +1025,12 @@ trace_selftest_startup_nop(struct tracer *trace, struct trace_array *tr)
> #endif
>
> #ifdef CONFIG_SCHED_TRACER
> +
> +struct wakeup_test_data {
> + struct completion is_ready;
> + int go;
> +};
Yeah that works..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/