On Mon, Jul 12, 2021 at 12:43 AM Waiman Long <llong@xxxxxxxxxx> wrote:
On 7/11/21 10:14 AM, Xiongwei Song wrote:As far as I know, a spinlock can nest another spinlock. In
From: Xiongwei Song <sxwjean@xxxxxxxxx>I believe the purpose of CONFIG_PROVE_RAW_LOCK_NESTING is experimental
We now always get a "Invalid wait context" warning with
CONFIG_PROVE_RAW_LOCK_NESTING=y, see the full warning below:
[ 0.705900] =============================
[ 0.706002] [ BUG: Invalid wait context ]
[ 0.706180] 5.13.0+ #4 Not tainted
[ 0.706349] -----------------------------
and it is turned off by default. Turning it on can cause problem as
shown in your lockdep splat. Limiting it to just PREEMPT_RT will defeat
its purpose to find potential spinlock nesting problem in non-PREEMPT_RT
kernel.
non-PREEMPT_RT kernel
spin_lock and raw_spin_lock are same , so here acquiring a spin_lock in hardirq
context is acceptable, the warning is not needed. My knowledge on this
is not enough,
Will dig into this.
The point is to fix the issue found,Agree. I thought there was a spinlock usage issue, but by checking
deactivate_slab context,
looks like the spinlock usage is well. Maybe I'm missing something?