Skip to contentSkip to conversation

3.6.9-rt21

ANNOUNCE Thomas Gleixner 5 participants 9 messages Dec 5, 2012 – Dec 17, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Dear RT Folks,

I'm pleased to announce the 3.6.9-rt21 release. 3.6.7-rt18, 3.6.8-rt19 and 3.6.9-rt20 are not announced updates to the respective 3.6.y stable releases without any RT changes

Changes since 3.6.9-rt20:

* Fix the PREEMPT_LAZY implementation on ARM

* Fix the RCUTINY issues

* Fix a long standing scheduler bug (See commit log of sched-enqueue-to-head.patch)

Known issues:

* There is still a possibility to get false positives from the NOHZ idle softirq pending detector. It's rather complex to fix and I have postponed it for a separate release. The warnings are harmless and can be ignored for now.

The delta patch against 3.6.9-rt20 is appended below and can be found here:

http://www.kernel.org/pub/linux/kernel/projects/rt/3.6/incr/patch-3.6.9-rt20-rt21.patch.xz

The RT patch against 3.6.9 can be found here:

http://www.kernel.org/pub/linux/kernel/projects/rt/3.6/patch-3.6.9-rt21.patch.xz

The split quilt queue is available at:

http://www.kernel.org/pub/linux/kernel/projects/rt/3.6/patches-3.6.9-rt21.tar.xz

Enjoy,

tglx

------------->

arch/arm/kernel/entry-armv.S +6 -5
Index: linux-stable/arch/arm/kernel/entry-armv.S
===================================================================
@@ -216,17 +216,18 @@ __irq_svc:
 #ifdef CONFIG_PREEMPT
 	get_thread_info tsk
 	ldr	r8, [tsk, #TI_PREEMPT]		@ get preempt count
-	ldr	r0, [tsk, #TI_FLAGS]		@ get flags
 	teq	r8, #0				@ if preempt count != 0
-	movne	r0, #0				@ force flags to 0
-	tst	r0, #_TIF_NEED_RESCHED
-	blne	svc_preempt
-	ldr	r8, [tsk, #TI_PREEMPT_LAZY]	@ get preempt lazy count
+	bne	1f				@ return from exeption
 	ldr	r0, [tsk, #TI_FLAGS]		@ get flags
+	tst	r0, #_TIF_NEED_RESCHED		@ if NEED_RESCHED is set
+	blne	svc_preempt			@ preempt!
+
+	ldr	r8, [tsk, #TI_PREEMPT_LAZY]	@ get preempt lazy count
 	teq	r8, #0				@ if preempt lazy count != 0
 	movne	r0, #0				@ force flags to 0
 	tst	r0, #_TIF_NEED_RESCHED_LAZY
 	blne	svc_preempt
+1:
 #endif
 
 #ifdef CONFIG_TRACE_IRQFLAGS
kernel/Makefile +1 -1
Index: linux-stable/kernel/Makefile
===================================================================
@@ -10,7 +10,7 @@ obj-y     = fork.o exec_domain.o panic.o
 	    kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o \
 	    hrtimer.o nsproxy.o srcu.o semaphore.o \
 	    notifier.o ksysfs.o cred.o \
-	    async.o range.o groups.o lglock.o
+	    async.o range.o groups.o lglock.o wait-simple.o
 
 ifdef CONFIG_FUNCTION_TRACER
 # Do not trace debug files and internal ftrace files
kernel/rcutiny_plugin.h +9 -8
Index: linux-stable/kernel/rcutiny_plugin.h
===================================================================
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
+#include <linux/wait-simple.h>
 
 /* Global control variables for rcupdate callback mechanism. */
 struct rcu_ctrlblk {
@@ -260,7 +261,7 @@ static void show_tiny_preempt_stats(stru
 
 /* Controls for rcu_kthread() kthread. */
 static struct task_struct *rcu_kthread_task;
-static DECLARE_WAIT_QUEUE_HEAD(rcu_kthread_wq);
+static DEFINE_SWAIT_HEAD(rcu_kthread_wq);
 static unsigned long have_rcu_kthread_work;
 
 /*
@@ -710,7 +711,7 @@ void synchronize_rcu(void)
 }
 EXPORT_SYMBOL_GPL(synchronize_rcu);
 
-static DECLARE_WAIT_QUEUE_HEAD(sync_rcu_preempt_exp_wq);
+static DEFINE_SWAIT_HEAD(sync_rcu_preempt_exp_wq);
 static unsigned long sync_rcu_preempt_exp_count;
 static DEFINE_MUTEX(sync_rcu_preempt_exp_mutex);
 
@@ -732,7 +733,7 @@ static int rcu_preempted_readers_exp(voi
  */
 static void rcu_report_exp_done(void)
 {
-	wake_up(&sync_rcu_preempt_exp_wq);
+	swait_wake(&sync_rcu_preempt_exp_wq);
 }
 
 /*
@@ -784,8 +785,8 @@ void synchronize_rcu_expedited(void)
 	} else {
 		rcu_initiate_boost();
 		local_irq_restore(flags);
-		wait_event(sync_rcu_preempt_exp_wq,
-			   !rcu_preempted_readers_exp());
+		swait_event(sync_rcu_preempt_exp_wq,
+			    !rcu_preempted_readers_exp());
 	}
 
 	/* Clean up and exit. */
@@ -855,7 +856,7 @@ static void invoke_rcu_callbacks(void)
 {
 	have_rcu_kthread_work = 1;
 	if (rcu_kthread_task != NULL)
-		wake_up(&rcu_kthread_wq);
+		swait_wake(&rcu_kthread_wq);
 }
 
 #ifdef CONFIG_RCU_TRACE
@@ -885,8 +886,8 @@ static int rcu_kthread(void *arg)
 	unsigned long flags;
 
 	for (;;) {
-		wait_event_interruptible(rcu_kthread_wq,
-					 have_rcu_kthread_work != 0);
+		swait_event_interruptible(rcu_kthread_wq,
+					  have_rcu_kthread_work != 0);
 		morework = rcu_boost();
 		local_irq_save(flags);
 		work = have_rcu_kthread_work;
kernel/sched/core.c +12 -4
Index: linux-stable/kernel/sched/core.c
===================================================================
@@ -4268,6 +4268,8 @@ void rt_mutex_setprio(struct task_struct
 
 	trace_sched_pi_setprio(p, prio);
 	oldprio = p->prio;
+	if (oldprio == prio)
+		goto out_unlock;
 	prev_class = p->sched_class;
 	on_rq = p->on_rq;
 	running = task_current(rq, p);
@@ -4618,6 +4620,13 @@ recheck:
 		task_rq_unlock(rq, p, &flags);
 		goto recheck;
 	}
+
+	p->sched_reset_on_fork = reset_on_fork;
+
+	oldprio = p->prio;
+	if (oldprio == param->sched_priority)
+		goto out;
+
 	on_rq = p->on_rq;
 	running = task_current(rq, p);
 	if (on_rq)
@@ -4625,18 +4634,17 @@ recheck:
 	if (running)
 		p->sched_class->put_prev_task(rq, p);
 
-	p->sched_reset_on_fork = reset_on_fork;
-
-	oldprio = p->prio;
 	prev_class = p->sched_class;
 	__setscheduler(rq, p, policy, param->sched_priority);
 
 	if (running)
 		p->sched_class->set_curr_task(rq);
 	if (on_rq)
-		enqueue_task(rq, p, 0);
+		enqueue_task(rq, p, oldprio < param->sched_priority ?
+			     ENQUEUE_HEAD : 0);
 
 	check_class_changed(rq, p, prev_class, oldprio);
+out:
 	task_rq_unlock(rq, p, &flags);
 
 	rt_mutex_adjust_pi(p);
localversion-rt +1 -1
Index: linux-stable/localversion-rt
===================================================================
@@ -1 +1 @@
--rt20
+-rt21
include/linux/wait-simple.h new file +204 -0

204 lines not on this page · raw message

kernel/wait-simple.c new file +68 -0

68 lines not on this page · raw message

#1 lore raw

Hi Thomas

Quoted 3 lines

I'm pleased to announce the 3.6.9-rt21 release. 3.6.7-rt18, 3.6.8-rt19 and 3.6.9-rt20 are not announced updates to the respective 3.6.y stable releases without any RT changes

There is some progress here. It boots but sometimes i see the backtrace below.

Also: Has s.th. changed in respect to the modules. I have one module wich goes on an endless interrupt loop freezing the device. The driver works fine for 3.0 - 3.4 preempt rt kernels? This is a miscdev based driver. If someone is interested i can post the source over here. But unfortunatly i have not figured out why this thing goes to an endless interrupt. The identical driver works flawless on 3.4.

As always i have some platform adaptation code applied but nothing serious/different from the 3.4 patches which work fine.

Backtrace: 
[<c00114ec>] (dump_backtrace+0x0/0x110) from [<c029732c>] (dump_stack+0x18/0x1c)
 r6:c0327ca9 r5:00000da5 r4:00000000 r3:c7846080
[<c0297314>] (dump_stack+0x0/0x1c) from [<c001b910>] (warn_slowpath_common+0x54/0x6c)
[<c001b8bc>] (warn_slowpath_common+0x0/0x6c) from [<c001b94c>] (warn_slowpath_null+0x24/0x2c)
 r8:c03b0bc8 r7:c03c5f38 r6:c784e000 r5:60000013 r4:00000000

r3:00000009
[<c001b928>] (warn_slowpath_null+0x0/0x2c) from [<c00533cc>] (check_flags+0xcc/0x12c) [<c0053300>] (check_flags+0x0/0x12c) from [<c0054ef0>] (lock_is_held+0x3c/0xb4) [<c0054eb4>] (lock_is_held+0x0/0xb4) from [<c0043ff0>] (__might_sleep+0x40/0x1d0)
r8:c03b2440 r7:c03c5f38 r6:00000000 r5:c0327ce1 r4:00000481
r3:00000000
[<c0043fb0>] (__might_sleep+0x0/0x1d0) from [<c0299228>] (rt_mutex_lock+0x20/0x40)
r7:c784ff24 r6:c08c0e80 r5:c784e000 r4:c784ff20
[<c0299208>] (rt_mutex_lock+0x0/0x40) from [<c0068a54>] (rcu_kthread+0x100/0x198)
r4:c784ff20 r3:c784ff40
[<c0068954>] (rcu_kthread+0x0/0x198) from [<c003be14>] (kthread+0x90/0x9c) [<c003bd84>] (kthread+0x0/0x9c) from [<c00218e8>] (do_exit+0x0/0x2f0)
r7:00000013 r6:c00218e8 r5:c003bd84 r4:c782becc

---[ end trace 0000000000000002 ]---
possible reason: unannotated irqs-on.
irq event stamp: 87282
hardirqs last  enabled at (87281): [<c029a1a8>] _raw_spin_unlock_irqrestore+0x44/0x80
hardirqs last disabled at (87282): [<c00541c8>] debug_check_no_locks_freed+0x44/0x154
softirqs last  enabled at (0): [<c001a2fc>] copy_process+0x1f4/0xb78
softirqs last disabled at (0): [<  (null)>]   (null)

Best regards
Tim

#2 lore raw

Hi

Quoted 6 lines

Also: Has s.th. changed in respect to the modules. I have one module wich goes on an endless interrupt loop freezing the device. The driver works fine for 3.0 - 3.4 preempt rt kernels? This is a miscdev based driver. If someone is interested i can post the source over here. But unfortunatly i have not figured out why this thing goes to an endless interrupt. The identical driver works flawless on 3.4.

I have just crosschecked with 3.6.9. The same error as with the preempt rt version. So it's not an preempt rt problem.

Best regards
Tim

#3 lore raw
In reply to Tim Sander

Heya. As some may remember, I said I was going to build an E5 machine. Well I did, well atleast ordered the most similar to what I wanted, and exchanged the graphics-card (pcie3.0) only. I was completely correct in that this machine, would have low-jitter /low-latency. And it completely lives up to expectations. So if you want low-jitter (think amiga, if that references means something to you), definately get an E5 (with direct i/o).

Threadirqs also works on this computer.

Peace Be With You.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 11 lines · jdow
Quoted 9 lines · Ove Karlsen

Heya. As some may remember, I said I was going to build an E5 machine. Well I did, well atleast ordered the most similar to what I wanted, and exchanged the graphics-card (pcie3.0) only. I was completely correct in that this machine, would have low-jitter
/low-latency. And it completely lives up to expectations. So if you want low-jitter (think amiga, if that references means something to you), definately get an E5 (with direct i/o).

Threadirqs also works on this computer.

Quoted 7 lines

Ah, yes, we did do some surprising things with those old boxes. Richmond Sound Design had some applications for assisting stage managers in theatrical, theme park, and other presentation applications. The jitter compared to latency was remarkably low considering the age of the boxes.

{^_-} We you ever on BIX? (I don't recognize the name, though.)
Joanne

Yeah, we have finally caught up, and that is a very good thing. No I was never on BIX.

Peace Be WIth You.

#6 lore raw
In reply to Thomas Gleixner
Quoted 6 lines · Thomas Gleixner

Dear RT Folks,

I'm pleased to announce the 3.6.9-rt21 release. 3.6.7-rt18, 3.6.8-rt19 and 3.6.9-rt20 are not announced updates to the respective 3.6.y stable releases without any RT changes

Quoted 8 lines

Changes since 3.6.9-rt20:

* Fix the PREEMPT_LAZY implementation on ARM

* Fix the RCUTINY issues

* Fix a long standing scheduler bug (See commit log of sched-enqueue-to-head.patch)

That last has an oversight buglet.

sched: add missing userspace->kernel struct sched_param.sched_priority inversion

---
 kernel/sched/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
@@ -4624,7 +4624,7 @@ static int __sched_setscheduler(struct t
 	p->sched_reset_on_fork = reset_on_fork;
 
 	oldprio = p->prio;
-	if (oldprio == param->sched_priority)
+	if (oldprio == (MAX_RT_PRIO - 1) - param->sched_priority)
 		goto out;
 
 	on_rq = p->on_rq;
#7 lore raw
Quoted 28 lines · Mike Galbraith
Quoted 6 lines · Thomas Gleixner

Dear RT Folks,

I'm pleased to announce the 3.6.9-rt21 release. 3.6.7-rt18, 3.6.8-rt19 and 3.6.9-rt20 are not announced updates to the respective 3.6.y stable releases without any RT changes

Quoted 8 lines

Changes since 3.6.9-rt20:

* Fix the PREEMPT_LAZY implementation on ARM

* Fix the RCUTINY issues

* Fix a long standing scheduler bug (See commit log of sched-enqueue-to-head.patch)

That last has an oversight buglet.

sched: add missing userspace->kernel struct sched_param.sched_priority inversion

---
 kernel/sched/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

kernel/sched/core.c static int __sched_setscheduler(struct t · line 4630

Quoted 8 lines
kernel/sched/core.c +1 -1
@@ -4624,7 +4624,7 @@ static int __sched_setscheduler(struct t
 	p->sched_reset_on_fork = reset_on_fork;
 
 	oldprio = p->prio;
-	if (oldprio == param->sched_priority)
+	if (oldprio == (MAX_RT_PRIO - 1) - param->sched_priority)
 		goto out;
 
 	on_rq = p->on_rq;

Duh, yes. But there is another one here:

+ enqueue_task(rq, p, oldprio < param->sched_priority ?
+ ENQUEUE_HEAD : 0);

Bah. This reverse user/kernel priority nonsense really should go away!

Thanks,

tglx

#8 lore raw
Quoted 43 lines · Thomas Gleixner
Quoted 28 lines · Mike Galbraith
Quoted 6 lines · Thomas Gleixner

Dear RT Folks,

I'm pleased to announce the 3.6.9-rt21 release. 3.6.7-rt18, 3.6.8-rt19 and 3.6.9-rt20 are not announced updates to the respective 3.6.y stable releases without any RT changes

Quoted 8 lines

Changes since 3.6.9-rt20:

* Fix the PREEMPT_LAZY implementation on ARM

* Fix the RCUTINY issues

* Fix a long standing scheduler bug (See commit log of sched-enqueue-to-head.patch)

That last has an oversight buglet.

sched: add missing userspace->kernel struct sched_param.sched_priority inversion

---
 kernel/sched/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

kernel/sched/core.c static int __sched_setscheduler(struct t · line 4630

Quoted 8 lines
kernel/sched/core.c +1 -1
@@ -4624,7 +4624,7 @@ static int __sched_setscheduler(struct t
 	p->sched_reset_on_fork = reset_on_fork;
 
 	oldprio = p->prio;
-	if (oldprio == param->sched_priority)
+	if (oldprio == (MAX_RT_PRIO - 1) - param->sched_priority)
 		goto out;
 
 	on_rq = p->on_rq;

Duh, yes. But there is another one here:

(quoted diff) +2 -0
+               enqueue_task(rq, p, oldprio < param->sched_priority ?
+                            ENQUEUE_HEAD : 0);
Quoted 1 line

Bah. This reverse user/kernel priority nonsense really should go away!

Snort, I looked right at it too, looked perfectly fine :)

-Mike

#9 lore raw
Quoted 4 lines · Mike Galbraith
Quoted 1 line · Thomas Gleixner

Bah. This reverse user/kernel priority nonsense really should go away!

Snort, I looked right at it too, looked perfectly fine :)

The real bad news is, that I talked to someone about that reverse prio issue just a few hours before I committed that crime. Blergh!