Re: [ANNOUNCE] 3.6.9-rt21

2012-12-17 Thread Thomas Gleixner
On Mon, 17 Dec 2012, Mike Galbraith wrote:
> On Mon, 2012-12-17 at 16:35 +0100, Thomas Gleixner wrote: 
> > 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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] 3.6.9-rt21

2012-12-17 Thread Mike Galbraith
On Mon, 2012-12-17 at 16:35 +0100, Thomas Gleixner wrote: 
> On Sat, 15 Dec 2012, Mike Galbraith wrote:
> > On Wed, 2012-12-05 at 17:05 +0100, Thomas Gleixner wrote: 
> > > 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)
> > 
> > That last has an oversight buglet.
> > 
> > sched: add missing userspace->kernel struct sched_param.sched_priority 
> > inversion
> > 
> > Signed-off-by: Mike Galbraith 
> > ---
> >  kernel/sched/core.c |2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -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!

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

-Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] 3.6.9-rt21

2012-12-17 Thread Thomas Gleixner
On Sat, 15 Dec 2012, Mike Galbraith wrote:
> On Wed, 2012-12-05 at 17:05 +0100, Thomas Gleixner wrote: 
> > 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)
> 
> That last has an oversight buglet.
> 
> sched: add missing userspace->kernel struct sched_param.sched_priority 
> inversion
> 
> Signed-off-by: Mike Galbraith 
> ---
>  kernel/sched/core.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] 3.6.9-rt21

2012-12-14 Thread Mike Galbraith
On Wed, 2012-12-05 at 17:05 +0100, Thomas Gleixner wrote: 
> 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)

That last has an oversight buglet.

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

Signed-off-by: Mike Galbraith 
---
 kernel/sched/core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] 3.6.9-rt21

2012-12-08 Thread Ove Karlsen

On 12/8/2012 4:28 PM, jdow wrote:

On 2012/12/08 16:48, Ove Karlsen wrote:
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.


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] 3.6.9-rt21

2012-12-08 Thread 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.

Peace Be With You.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] 3.6.9-rt21

2012-12-06 Thread Tim Sander
Hi
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] 3.6.9-rt21

2012-12-06 Thread Tim Sander
Hi Thomas
> 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: 
[] (dump_backtrace+0x0/0x110) from [] (dump_stack+0x18/0x1c)
 r6:c0327ca9 r5:0da5 r4: r3:c7846080
[] (dump_stack+0x0/0x1c) from [] 
(warn_slowpath_common+0x54/0x6c)
[] (warn_slowpath_common+0x0/0x6c) from [] 
(warn_slowpath_null+0x24/0x2c)
 r8:c03b0bc8 r7:c03c5f38 r6:c784e000 r5:6013 r4:
r3:0009
[] (warn_slowpath_null+0x0/0x2c) from [] 
(check_flags+0xcc/0x12c)
[] (check_flags+0x0/0x12c) from [] (lock_is_held+0x3c/0xb4)
[] (lock_is_held+0x0/0xb4) from [] 
(__might_sleep+0x40/0x1d0)
 r8:c03b2440 r7:c03c5f38 r6: r5:c0327ce1 r4:0481
r3:
[] (__might_sleep+0x0/0x1d0) from [] 
(rt_mutex_lock+0x20/0x40)
 r7:c784ff24 r6:c08c0e80 r5:c784e000 r4:c784ff20
[] (rt_mutex_lock+0x0/0x40) from [] 
(rcu_kthread+0x100/0x198)
 r4:c784ff20 r3:c784ff40
[] (rcu_kthread+0x0/0x198) from [] (kthread+0x90/0x9c)
[] (kthread+0x0/0x9c) from [] (do_exit+0x0/0x2f0)
 r7:0013 r6:c00218e8 r5:c003bd84 r4:c782becc
---[ end trace 0002 ]---
possible reason: unannotated irqs-on.
irq event stamp: 87282
hardirqs last  enabled at (87281): [] 
_raw_spin_unlock_irqrestore+0x44/0x80
hardirqs last disabled at (87282): [] 
debug_check_no_locks_freed+0x44/0x154
softirqs last  enabled at (0): [] copy_process+0x1f4/0xb78
softirqs last disabled at (0): [<  (null)>]   (null)

Best regards
Tim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[ANNOUNCE] 3.6.9-rt21

2012-12-05 Thread 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

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

->
Index: linux-stable/arch/arm/kernel/entry-armv.S
===
--- linux-stable.orig/arch/arm/kernel/entry-armv.S
+++ 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
-   blnesvc_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
+   blnesvc_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
blnesvc_preempt
+1:
 #endif
 
 #ifdef CONFIG_TRACE_IRQFLAGS
Index: linux-stable/kernel/Makefile
===
--- linux-stable.orig/kernel/Makefile
+++ 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
Index: linux-stable/kernel/rcutiny_plugin.h
===
--- linux-stable.orig/kernel/rcutiny_plugin.h
+++ linux-stable/kernel/rcutiny_plugin.h
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /* 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,
-