Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbbEKP4p (ORCPT ); Mon, 11 May 2015 11:56:45 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:37554 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754478AbbEKP4j (ORCPT ); Mon, 11 May 2015 11:56:39 -0400 Date: Mon, 11 May 2015 17:56:36 +0200 From: Frederic Weisbecker To: Peter Zijlstra Cc: LKML , Ingo Molnar , Thomas Gleixner , Linus Torvalds Subject: Re: [PATCH 5/7] sched: Pull preemption disablement duty up to __schedule() callers Message-ID: <20150511155634.GB32512@lerouge> References: <1431356904-4624-1-git-send-email-fweisbec@gmail.com> <1431356904-4624-6-git-send-email-fweisbec@gmail.com> <20150511155213.GY21418@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150511155213.GY21418@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1470 Lines: 40 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/