[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5297603D.6040300@suse.de>
Date: Thu, 28 Nov 2013 16:24:45 +0100
From: Alexander Graf <agraf@...e.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...nel.org, hpa@...or.com, linux-kernel@...r.kernel.org,
tglx@...utronix.de, linux-tip-commits@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH] sched: Remove PREEMPT_NEED_RESCHED from generic code
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@...e.de>
> Reported-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Fixes the issue for me.
Tested-by: Alexander Graf <agraf@...e.de>
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists