Re: [PATCH 1/1] sched: panic, when call schedule with preemption disable
From: Kathleen Chang
Date: Tue Nov 26 2019 - 08:11:42 EST
On Thu, 2019-11-21 at 13:30 +0100, Peter Zijlstra wrote:
> On Thu, Nov 21, 2019 at 04:13:05PM +0800, YT Chang wrote:
> > When preemption is disable, call schedule() is incorrect behavior.
> > Suggest to panic directly rather than depend on panic_on_warn.
>
> Why!?
1. Panic directly will easily find the root cause.
Call scheduling in atomic affects not only performance but also
system stability.
ex:
Call scheduling in IRQ will result in IRQ enable after schedule()
2. A lot of warnings depend on panic_on_warn. It is not practical to
set panic_on_warn=1.