All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, linux-tip-commits@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] sched: Remove PREEMPT_NEED_RESCHED from generic code
Date: Thu, 28 Nov 2013 16:24:45 +0100	[thread overview]
Message-ID: <5297603D.6040300@suse.de> (raw)
In-Reply-To: <20131128132641.GP10022@twins.programming.kicks-ass.net>

On 11/28/2013 02:26 PM, Peter Zijlstra wrote:
> Subject: sched: Remove PREEMPT_NEED_RESCHED from generic code
>
> While hunting a preemption issue with Alexander, Ben noticed that the
> currently generic PREEMPT_NEED_RESCHED stuff is horribly broken for
> load-store architectures.
>
> We currently rely on the IPI to fold TIF_NEED_RESCHED into
> PREEMPT_NEED_RESCHED, but when this IPI lands while we already have
> a load for the preempt-count but before the store, the store will erase
> the PREEMPT_NEED_RESCHED change.
>
> The current preempt-count only works on load-store archs because
> interrupts are assumed to be completely balanced wrt their preempt_count
> fiddling; the previous preempt_count load will match the preempt_count
> state after the interrupt and therefore nothing gets lost.
>
> This patch removes the PREEMPT_NEED_RESCHED usage from generic code and
> pushes it into x86 arch code; the generic code goes back to relying on
> TIF_NEED_RESCHED.
>
> Boot tested on x86_64 and compile tested on ppc64.
>
> Reported-by: Alexander Graf <agraf@suse.de>
> Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Peter Zijlstra <peterz@infradead.org>

Fixes the issue for me.

Tested-by: Alexander Graf <agraf@suse.de>


Alex


  reply	other threads:[~2013-11-28 15:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25 16:38 [tip:sched/core] sched: Add NEED_RESCHED to the preempt_count tip-bot for Peter Zijlstra
2013-09-27  9:14 ` Yuanhan Liu
2013-09-27 11:57   ` Peter Zijlstra
2013-09-27 12:13     ` Fengguang Wu
2013-09-27 12:20       ` Fengguang Wu
2013-09-27 15:29   ` [PATCH] ftrace, sched: Add TRACE_FLAG_PREEMPT_RESCHED Peter Zijlstra
2013-10-04  8:09     ` Peter Zijlstra
2013-10-04 14:53       ` Steven Rostedt
2013-10-04 15:16         ` Peter Zijlstra
2013-10-04 15:25           ` Steven Rostedt
2013-10-04 15:28         ` Peter Zijlstra
2013-10-04 15:57           ` Steven Rostedt
2013-10-04 16:28             ` Peter Zijlstra
2013-11-11 17:52           ` [tip:sched/core] " tip-bot for Peter Zijlstra
2013-11-06 16:37     ` [PATCH] " Steven Rostedt
2013-11-06 16:45       ` Peter Zijlstra
2013-11-06 16:58         ` Steven Rostedt
2013-11-06 17:23           ` Peter Zijlstra
2013-09-27 15:30   ` [PATCH] sched: Revert need_resched() to look at TIF_NEED_RESCHED Peter Zijlstra
2013-09-28  8:28     ` [tip:sched/core] " tip-bot for Peter Zijlstra
2013-12-09  6:41     ` [PATCH] " Aneesh Kumar K.V
2013-12-10 15:52       ` Peter Zijlstra
2013-11-28 13:26 ` [PATCH] sched: Remove PREEMPT_NEED_RESCHED from generic code Peter Zijlstra
2013-11-28 15:24   ` Alexander Graf [this message]
2013-12-09  6:29   ` Benjamin Herrenschmidt
2013-12-12  9:51   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra

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=5297603D.6040300@suse.de \
    --to=agraf@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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.