Re: Using tracing_off() in __schedule_bug()

From: Steven Rostedt
Date: Fri Mar 12 2010 - 18:34:14 EST


On Fri, 2010-03-12 at 10:32 -0500, Chase Douglas wrote:
> We're considering using tracing_off() in __schedule_bug() in the
> Ubuntu kernel to help us solve "scheduling while atomic" bugs without
> needing to compile and install a special kernel to do so. Using the
> tracing_off() call enables us to generate smaller function traces when
> debugging, and find the bug easier since it should be at the end of
> any traces. The patch we are thinking of using can be found at [1].
> You can find an overview of how bugs are solved using this approach
> there as well.
>
> Are there any thoughts as to the appropriateness of this patch in
> Ubuntu kernels? My guess is that this isn't done in the upstream
> vanilla kernels because it would be annoying to have a stock kernel
> littered with tracing_off() calls if you hit one when you weren't
> meaning to. However, we're interested in hearing if there's some
> negative consequence we haven't thought of.

Actually, it has been on my TODO list to litter tracing_off() all over
the kernel ;-)

No, by all means, I would definitely take a patch that turn off tracing
at critical areas. One of which I would like to do is with the BUG()
call.

Hmm, thinking about it more, I would rather have a separate function,
that would call tracing_off() if some variable is set. By default it
would be set, but in case you want to keep tracing after a bug is hit,
you can have a way to disable it.

I need to write up a patch soon. Thanks for bring this up.

-- Steve


--
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/