* [ANNOUNCE] 3.6.9-rt21
@ 2012-12-05 16:05 Thomas Gleixner
2012-12-06 14:35 ` Tim Sander
2012-12-15 3:52 ` Mike Galbraith
0 siblings, 2 replies; 9+ messages in thread
From: Thomas Gleixner @ 2012-12-05 16:05 UTC (permalink / raw)
To: LKML; +Cc: linux-rt-users
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
- 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
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 <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;
Index: linux-stable/kernel/sched/core.c
===================================================================
--- linux-stable.orig/kernel/sched/core.c
+++ 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);
Index: linux-stable/localversion-rt
===================================================================
--- linux-stable.orig/localversion-rt
+++ linux-stable/localversion-rt
@@ -1 +1 @@
--rt20
+-rt21
Index: linux-stable/include/linux/wait-simple.h
===================================================================
--- /dev/null
+++ linux-stable/include/linux/wait-simple.h
@@ -0,0 +1,204 @@
+#ifndef _LINUX_WAIT_SIMPLE_H
+#define _LINUX_WAIT_SIMPLE_H
+
+#include <linux/spinlock.h>
+#include <linux/list.h>
+
+#include <asm/current.h>
+
+struct swaiter {
+ struct task_struct *task;
+ struct list_head node;
+};
+
+#define DEFINE_SWAITER(name) \
+ struct swaiter name = { \
+ .task = current, \
+ .node = LIST_HEAD_INIT((name).node), \
+ }
+
+struct swait_head {
+ raw_spinlock_t lock;
+ struct list_head list;
+};
+
+#define DEFINE_SWAIT_HEAD(name) \
+ struct swait_head name = { \
+ .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
+ .list = LIST_HEAD_INIT((name).list), \
+ }
+
+extern void __init_swait_head(struct swait_head *h, struct lock_class_key *key);
+
+#define init_swait_head(swh) \
+ do { \
+ static struct lock_class_key __key; \
+ \
+ __init_swait_head((swh), &__key); \
+ } while (0)
+
+/*
+ * Waiter functions
+ */
+static inline bool swaiter_enqueued(struct swaiter *w)
+{
+ return w->task != NULL;
+}
+
+extern void swait_prepare(struct swait_head *head, struct swaiter *w, int state);
+extern void swait_finish(struct swait_head *head, struct swaiter *w);
+
+/*
+ * Adds w to head->list. Must be called with head->lock locked.
+ */
+static inline void __swait_enqueue(struct swait_head *head, struct swaiter *w)
+{
+ list_add(&w->node, &head->list);
+}
+
+/*
+ * Removes w from head->list. Must be called with head->lock locked.
+ */
+static inline void __swait_dequeue(struct swaiter *w)
+{
+ list_del_init(&w->node);
+}
+
+/*
+ * Check whether a head has waiters enqueued
+ */
+static inline bool swait_head_has_waiters(struct swait_head *h)
+{
+ return !list_empty(&h->list);
+}
+
+/*
+ * Wakeup functions
+ */
+extern int __swait_wake(struct swait_head *head, unsigned int state);
+
+static inline int swait_wake(struct swait_head *head)
+{
+ return swait_head_has_waiters(head) ?
+ __swait_wake(head, TASK_NORMAL) : 0;
+}
+
+static inline int swait_wake_interruptible(struct swait_head *head)
+{
+ return swait_head_has_waiters(head) ?
+ __swait_wake(head, TASK_INTERRUPTIBLE) : 0;
+}
+
+/*
+ * Event API
+ */
+
+#define __swait_event(wq, condition) \
+do { \
+ DEFINE_SWAITER(__wait); \
+ \
+ for (;;) { \
+ swait_prepare(&wq, &__wait, TASK_UNINTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ schedule(); \
+ } \
+ swait_finish(&wq, &__wait); \
+} while (0)
+
+/**
+ * swait_event - sleep until a condition gets true
+ * @wq: the waitqueue to wait on
+ * @condition: a C expression for the event to wait for
+ *
+ * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
+ * @condition evaluates to true. The @condition is checked each time
+ * the waitqueue @wq is woken up.
+ *
+ * wake_up() has to be called after changing any variable that could
+ * change the result of the wait condition.
+ */
+#define swait_event(wq, condition) \
+do { \
+ if (condition) \
+ break; \
+ __swait_event(wq, condition); \
+} while (0)
+
+#define __swait_event_interruptible(wq, condition, ret) \
+do { \
+ DEFINE_SWAITER(__wait); \
+ \
+ for (;;) { \
+ swait_prepare(&wq, &__wait, TASK_INTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ if (signal_pending(current)) { \
+ ret = -ERESTARTSYS; \
+ break; \
+ } \
+ schedule(); \
+ } \
+ swait_finish(&wq, &__wait); \
+} while (0)
+
+/**
+ * swait_event_interruptible - sleep until a condition gets true
+ * @wq: the waitqueue to wait on
+ * @condition: a C expression for the event to wait for
+ *
+ * The process is put to sleep (TASK_INTERRUPTIBLE) until the
+ * @condition evaluates to true. The @condition is checked each time
+ * the waitqueue @wq is woken up.
+ *
+ * wake_up() has to be called after changing any variable that could
+ * change the result of the wait condition.
+ */
+#define swait_event_interruptible(wq, condition) \
+({ \
+ int __ret = 0; \
+ if (!(condition)) \
+ __swait_event_interruptible(wq, condition, __ret); \
+ __ret; \
+})
+
+#define __swait_event_timeout(wq, condition, ret) \
+do { \
+ DEFINE_SWAITER(__wait); \
+ \
+ for (;;) { \
+ swait_prepare(&wq, &__wait, TASK_UNINTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ ret = schedule_timeout(ret); \
+ if (!ret) \
+ break; \
+ } \
+ swait_finish(&wq, &__wait); \
+} while (0)
+
+/**
+ * swait_event_timeout - sleep until a condition gets true or a timeout elapses
+ * @wq: the waitqueue to wait on
+ * @condition: a C expression for the event to wait for
+ * @timeout: timeout, in jiffies
+ *
+ * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
+ * @condition evaluates to true. The @condition is checked each time
+ * the waitqueue @wq is woken up.
+ *
+ * wake_up() has to be called after changing any variable that could
+ * change the result of the wait condition.
+ *
+ * The function returns 0 if the @timeout elapsed, and the remaining
+ * jiffies if the condition evaluated to true before the timeout elapsed.
+ */
+#define swait_event_timeout(wq, condition, timeout) \
+({ \
+ long __ret = timeout; \
+ if (!(condition)) \
+ __swait_event_timeout(wq, condition, __ret); \
+ __ret; \
+})
+
+#endif
Index: linux-stable/kernel/wait-simple.c
===================================================================
--- /dev/null
+++ linux-stable/kernel/wait-simple.c
@@ -0,0 +1,68 @@
+/*
+ * Simple waitqueues without fancy flags and callbacks
+ *
+ * (C) 2011 Thomas Gleixner <tglx@linutronix.de>
+ *
+ * Based on kernel/wait.c
+ *
+ * For licencing details see kernel-base/COPYING
+ */
+#include <linux/init.h>
+#include <linux/export.h>
+#include <linux/sched.h>
+#include <linux/wait-simple.h>
+
+void __init_swait_head(struct swait_head *head, struct lock_class_key *key)
+{
+ raw_spin_lock_init(&head->lock);
+ lockdep_set_class(&head->lock, key);
+ INIT_LIST_HEAD(&head->list);
+}
+EXPORT_SYMBOL_GPL(__init_swait_head);
+
+void swait_prepare(struct swait_head *head, struct swaiter *w, int state)
+{
+ unsigned long flags;
+
+ raw_spin_lock_irqsave(&head->lock, flags);
+ w->task = current;
+ if (list_empty(&w->node))
+ __swait_enqueue(head, w);
+ set_current_state(state);
+ raw_spin_unlock_irqrestore(&head->lock, flags);
+}
+EXPORT_SYMBOL_GPL(swait_prepare);
+
+void swait_finish(struct swait_head *head, struct swaiter *w)
+{
+ unsigned long flags;
+
+ __set_current_state(TASK_RUNNING);
+ if (w->task) {
+ raw_spin_lock_irqsave(&head->lock, flags);
+ __swait_dequeue(w);
+ raw_spin_unlock_irqrestore(&head->lock, flags);
+ }
+}
+EXPORT_SYMBOL_GPL(swait_finish);
+
+int __swait_wake(struct swait_head *head, unsigned int state)
+{
+ struct swaiter *curr, *next;
+ unsigned long flags;
+ int woken = 0;
+
+ raw_spin_lock_irqsave(&head->lock, flags);
+
+ list_for_each_entry_safe(curr, next, &head->list, node) {
+ if (wake_up_state(curr->task, state)) {
+ __swait_dequeue(curr);
+ curr->task = NULL;
+ woken++;
+ }
+ }
+
+ raw_spin_unlock_irqrestore(&head->lock, flags);
+ return woken;
+}
+EXPORT_SYMBOL_GPL(__swait_wake);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
2012-12-05 16:05 [ANNOUNCE] 3.6.9-rt21 Thomas Gleixner
@ 2012-12-06 14:35 ` Tim Sander
2012-12-06 20:52 ` Tim Sander
2012-12-09 0:48 ` Ove Karlsen
2012-12-15 3:52 ` Mike Galbraith
1 sibling, 2 replies; 9+ messages in thread
From: Tim Sander @ 2012-12-06 14:35 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, linux-rt-users
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:
[<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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
2012-12-06 14:35 ` Tim Sander
@ 2012-12-06 20:52 ` Tim Sander
2012-12-09 0:48 ` Ove Karlsen
1 sibling, 0 replies; 9+ messages in thread
From: Tim Sander @ 2012-12-06 20:52 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, linux-rt-users
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
2012-12-06 14:35 ` Tim Sander
2012-12-06 20:52 ` Tim Sander
@ 2012-12-09 0:48 ` Ove Karlsen
[not found] ` <50C3DB17.2010705@earthlink.net>
1 sibling, 1 reply; 9+ messages in thread
From: Ove Karlsen @ 2012-12-09 0:48 UTC (permalink / raw)
To: peoples; +Cc: Thomas Gleixner, LKML, linux-rt-users
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
[not found] ` <50C3DB17.2010705@earthlink.net>
@ 2012-12-09 10:08 ` Ove Karlsen
0 siblings, 0 replies; 9+ messages in thread
From: Ove Karlsen @ 2012-12-09 10:08 UTC (permalink / raw)
To: jdow; +Cc: LKML, linux-rt-users
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
2012-12-05 16:05 [ANNOUNCE] 3.6.9-rt21 Thomas Gleixner
2012-12-06 14:35 ` Tim Sander
@ 2012-12-15 3:52 ` Mike Galbraith
2012-12-17 15:35 ` Thomas Gleixner
1 sibling, 1 reply; 9+ messages in thread
From: Mike Galbraith @ 2012-12-15 3:52 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, linux-rt-users
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 <bitbucket@online.de>
---
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;
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
2012-12-15 3:52 ` Mike Galbraith
@ 2012-12-17 15:35 ` Thomas Gleixner
2012-12-17 17:09 ` Mike Galbraith
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2012-12-17 15:35 UTC (permalink / raw)
To: Mike Galbraith; +Cc: LKML, linux-rt-users
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 <bitbucket@online.de>
> ---
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
2012-12-17 15:35 ` Thomas Gleixner
@ 2012-12-17 17:09 ` Mike Galbraith
2012-12-17 19:44 ` Thomas Gleixner
0 siblings, 1 reply; 9+ messages in thread
From: Mike Galbraith @ 2012-12-17 17:09 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, linux-rt-users
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 <bitbucket@online.de>
> > ---
> > 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] 3.6.9-rt21
2012-12-17 17:09 ` Mike Galbraith
@ 2012-12-17 19:44 ` Thomas Gleixner
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Gleixner @ 2012-12-17 19:44 UTC (permalink / raw)
To: Mike Galbraith; +Cc: LKML, linux-rt-users
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!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-12-17 19:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-05 16:05 [ANNOUNCE] 3.6.9-rt21 Thomas Gleixner
2012-12-06 14:35 ` Tim Sander
2012-12-06 20:52 ` Tim Sander
2012-12-09 0:48 ` Ove Karlsen
[not found] ` <50C3DB17.2010705@earthlink.net>
2012-12-09 10:08 ` Ove Karlsen
2012-12-15 3:52 ` Mike Galbraith
2012-12-17 15:35 ` Thomas Gleixner
2012-12-17 17:09 ` Mike Galbraith
2012-12-17 19:44 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).