Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441402 > unrolled thread

[PATCH RT 11/15] arm: lazy preempt: correct resched condition

Started bySteven Rostedt <rostedt@goodmis.org>
First post2016-07-12 16:30 +0200
Last post2016-07-12 16:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH RT 11/15] arm: lazy preempt: correct resched condition Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 16:30 +0200

#1441402 — [PATCH RT 11/15] arm: lazy preempt: correct resched condition

FromSteven Rostedt <rostedt@goodmis.org>
Date2016-07-12 16:30 +0200
Subject[PATCH RT 11/15] arm: lazy preempt: correct resched condition
Message-ID<rU6Rc-66R-25@gated-at.bofh.it>
3.18.36-rt38-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

If we get out of preempt_schedule_irq() then we check for NEED_RESCHED
and call the former function again if set because the preemption counter
has be zero at this point.
However the counter for lazy-preempt might not be zero therefore we have
to check the counter before looking at the need_resched_lazy flag.

Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/arm/kernel/entry-armv.S | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 61af605ae614..1c4842879e17 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -236,7 +236,11 @@ svc_preempt:
 	bne	1b
 	tst	r0, #_TIF_NEED_RESCHED_LAZY
 	reteq	r8				@ go again
-	b	1b
+	ldr	r0, [tsk, #TI_PREEMPT_LAZY]	@ get preempt lazy count
+	teq	r0, #0				@ if preempt lazy count != 0
+	beq	1b
+	ret	r8				@ go again
+
 #endif
 
 __und_fault:
-- 
2.8.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web