RE: [PATCH 1/1] sched.h: silent false ATOMIC_SLEEP warning from cond_resched

From: Maninder Singh
Date: Thu Oct 10 2024 - 07:14:11 EST


> >
> > In our case there was a call to vunmap_pmd_range from __do_softirq,
> > and vunmap_pmd_range is not actually sleeping call, but because of
> > cond_resched it was giving warning with DEBUG_ATOMIC_SLEEP.
> >
> > and cond_resched in case of CONFIG_PREEMPTION is empty function with below change:
>
> By still having that warning we helpfully tell you your code is broken
> for that other .config. Code should be good irrespective of the .config
> used, right?

But isn't it un-necessary to report a warning for a particular .config set,
when in actual that issue can not happen and code was written accordingly.

Because for other .config it will be a total different system and user can change
code design for that.


But you better know about it, so it is your call :)

Thanks,
Maninder Singh