Re: [PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_
From: Sebastian Andrzej Siewior
Date: Fri Feb 16 2018 - 12:55:18 EST
On 2018-02-16 12:31:09 [-0500], Steven Rostedt wrote:
> On Fri, 16 Feb 2018 09:53:03 +0100
> Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:
>
> > As for the second invocation (tasklet_action_common() part) is always
> > invoked in BH-disabled context (even if called from ksoftirqd) so you
> > are never preemptible() and can't switch CPUs.
> > So I am going to correct this patch as you suggested but I don't see the
> > reason to do the same in the second one.
>
> Should we add something like:
>
> WARN_ON_ONCE(!in_atomic());
>
> ?
Doubt it. this_cpu_ptr() screams already with CONFIG_DEBUG_PREEMPT.
> -- Steve
Sebastian