lkml.org 
[lkml]   [2015]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] sched: Pull preemption disablement duty up to __schedule() callers
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.


\
 
 \ /
  Last update: 2015-05-11 18:21    [W:0.063 / U:32.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site