[PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-27 Thread Sebastian Andrzej Siewior
From: Ingo Molnar __tasklet_schedule() and __tasklet_hi_schedule() are almost identical. Move the common code from both function into __tasklet_schedule_common() and let both functions invoke it with different arguments. Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt Signed-off-by: T

Re: [PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-16 Thread Steven Rostedt
On Fri, 16 Feb 2018 18:55:09 +0100 Sebastian Andrzej Siewior wrote: > > Should we add something like: > > > > WARN_ON_ONCE(!in_atomic()); > > > > ? > > Doubt it. this_cpu_ptr() screams already with CONFIG_DEBUG_PREEMPT. If that's the case then, yeah I agree. I couldn't remember if this

Re: [PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-16 Thread Sebastian Andrzej Siewior
On 2018-02-16 12:31:09 [-0500], Steven Rostedt wrote: > On Fri, 16 Feb 2018 09:53:03 +0100 > Sebastian Andrzej Siewior 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 preempt

Re: [PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-16 Thread Steven Rostedt
On Fri, 16 Feb 2018 09:53:03 +0100 Sebastian Andrzej Siewior 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 patc

Re: [PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-16 Thread Sebastian Andrzej Siewior
On 2018-02-15 15:07:07 [-0500], Steven Rostedt wrote: > On Thu, 15 Feb 2018 18:20:41 +0100 > Sebastian Andrzej Siewior wrote: > > > -void __tasklet_schedule(struct tasklet_struct *t) > > +static void __tasklet_schedule_common(struct tasklet_struct *t, > > + struct

Re: [PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-15 Thread Julia Cartwright
On Thu, Feb 15, 2018 at 03:07:07PM -0500, Steven Rostedt wrote: > On Thu, 15 Feb 2018 18:20:41 +0100 > Sebastian Andrzej Siewior wrote: > > > -void __tasklet_schedule(struct tasklet_struct *t) > > +static void __tasklet_schedule_common(struct tasklet_struct *t, > > +

Re: [PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-15 Thread Steven Rostedt
On Thu, 15 Feb 2018 18:20:41 +0100 Sebastian Andrzej Siewior wrote: > -void __tasklet_schedule(struct tasklet_struct *t) > +static void __tasklet_schedule_common(struct tasklet_struct *t, > + struct tasklet_head *head, > + unsign

[PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-15 Thread Sebastian Andrzej Siewior
From: Ingo Molnar __tasklet_schedule() and __tasklet_hi_schedule() are almost identical. Move the common code from both function into __tasklet_schedule_common() and let both functions invoke it with different arguments. Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt Signed-off-by: T