Re: [RFC PATCH 2/2] sched: sysctl: Panic on scheduling while atomic

From: Daniel Bristot de Oliveira
Date: Wed Jun 01 2016 - 09:37:25 EST

On 06/01/2016 06:45 AM, Peter Zijlstra wrote:
> Do we really need more panic_on_* knobs? Can't we re-purpose
> panic_on_warn for this?

I think this case is very specific, specific enough to deserve its own
sysctl. But I see your point, and the possibilities I can see are:

1) convert the printk(KERN_ERR "BUG:...") to a WARN(1,"BUG:..."), but
this will hide all other information printed in the function, so -1 for
this option;

2) fire a WARN in the end of the function with a message like the
previous printk(); or

3) re-use the panic_on_warn variable to condition the panic,
or to force a WARN.

But, IMHO, I think these are not as polish as use a specific sysctl.

If you think that any of these options are better than what I propose,
I can cook a v2 with the best option :-).

-- Daniel