All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 5/7] sched: Pull preemption disablement duty up to __schedule() callers
Date: Mon, 11 May 2015 17:52:13 +0200	[thread overview]
Message-ID: <20150511155213.GY21418@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1431356904-4624-6-git-send-email-fweisbec@gmail.com>

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.

  reply	other threads:[~2015-05-11 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 15:08 [RFC PATCH 0/7] preempt: A few headers cleanups and preempt_schedule*() optimizations Frederic Weisbecker
2015-05-11 15:08 ` [PATCH 1/7] preempt: Merge preempt_mask.h into preempt.h Frederic Weisbecker
2015-05-11 15:08 ` [PATCH 2/7] preempt: Rearrange a few symbols after headers merge Frederic Weisbecker
2015-05-11 15:08 ` [PATCH 3/7] preempt: Rename PREEMPT_CHECK_OFFSET to PREEMPT_DISABLE_OFFSET Frederic Weisbecker
2015-05-11 15:08 ` [PATCH 4/7] preempt: Disable preemption from preempt_schedule*() callers Frederic Weisbecker
2015-05-11 15:51   ` Peter Zijlstra
2015-05-11 15:08 ` [PATCH 5/7] sched: Pull preemption disablement duty up to __schedule() callers Frederic Weisbecker
2015-05-11 15:52   ` Peter Zijlstra [this message]
2015-05-11 15:56     ` Frederic Weisbecker
2015-05-11 15:08 ` [PATCH 6/7] preempt: Fix out of date comment Frederic Weisbecker
2015-05-11 15:08 ` [PATCH 7/7] preempt: Remove PREEMPT_ACTIVE unmasking off in_atomic() Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150511155213.GY21418@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.