Re: [PATCH 5/7] sched: Pull preemption disablement duty up to __schedule() callers

From: Frederic Weisbecker
Date: Mon May 11 2015 - 11:56:49 EST


On Mon, May 11, 2015 at 05:52:13PM +0200, Peter Zijlstra wrote:
> On Mon, May 11, 2015 at 05:08:22PM +0200, Frederic Weisbecker wrote:
> > +++ b/kernel/sched/core.c
> > @@ -2723,9 +2723,7 @@ again:
> > * - return from syscall or exception to user-space
> > * - return from interrupt-handler to user-space
> > *
> > - * WARNING: all callers must re-check need_resched() afterward and reschedule
> > - * accordingly in case an event triggered the need for rescheduling (such as
> > - * an interrupt waking up a task) while preemption was disabled in __schedule().
> > + * WARNING: must be called with preemption disabled!
> > */
> > static void __sched __schedule(void)
> > {
> > @@ -2734,7 +2732,6 @@ static void __sched __schedule(void)
> > struct rq *rq;
> > int cpu;
> >
> > - preempt_disable();
> > cpu = smp_processor_id();
> > rq = cpu_rq(cpu);
> > rcu_note_context_switch();
> > @@ -2798,8 +2795,6 @@ static void __sched __schedule(void)
> > raw_spin_unlock_irq(&rq->lock);
> >
> > post_schedule(rq);
> > -
> > - sched_preempt_enable_no_resched();
> > }
>
> Ah, see, you need to fold this patch into the previous one.

Yeah I hesitated. I'm going to fold then.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/