[rt] Update to 4.0.8-rt6
svn path=/dists/sid/linux/; revision=22841
This commit is contained in:
parent
1fcd372ae9
commit
2017c10b63
|
@ -1,3 +1,9 @@
|
|||
linux (4.0.8-2) UNRELEASED; urgency=medium
|
||||
|
||||
* [rt] Update to 4.0.8-rt6
|
||||
|
||||
-- Uwe Kleine-König <uwe@kleine-koenig.org> Tue, 21 Jul 2015 23:19:12 +0200
|
||||
|
||||
linux (4.0.8-1) unstable; urgency=medium
|
||||
|
||||
* New upstream stable update:
|
||||
|
|
|
@ -2,7 +2,7 @@ From d118bf15da869e555f5cd1d6f491f6f4c1b9df93 Mon Sep 17 00:00:00 2001
|
|||
From: Anders Roxell <anders.roxell@linaro.org>
|
||||
Date: Mon, 27 Apr 2015 22:53:08 +0200
|
||||
Subject: [PATCH 1/3] arm64: Mark PMU interrupt IRQF_NO_THREAD
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Mark the PMU interrupts as non-threadable, as is the case with
|
||||
arch/arm: d9c3365 ARM: 7813/1: Mark pmu interupt IRQF_NO_THREAD
|
||||
|
|
167
debian/patches/features/all/rt/0001-sched-Implement-lockless-wake-queues.patch
vendored
Normal file
167
debian/patches/features/all/rt/0001-sched-Implement-lockless-wake-queues.patch
vendored
Normal file
|
@ -0,0 +1,167 @@
|
|||
From 1fb321e7971c26d03e20a7f8d3bacc654c6abc5f Mon Sep 17 00:00:00 2001
|
||||
From: Peter Zijlstra <peterz@infradead.org>
|
||||
Date: Fri, 1 May 2015 08:27:50 -0700
|
||||
Subject: [PATCH 1/2] sched: Implement lockless wake-queues
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This is useful for locking primitives that can effect multiple
|
||||
wakeups per operation and want to avoid lock internal lock contention
|
||||
by delaying the wakeups until we've released the lock internal locks.
|
||||
|
||||
Alternatively it can be used to avoid issuing multiple wakeups, and
|
||||
thus save a few cycles, in packet processing. Queue all target tasks
|
||||
and wakeup once you've processed all packets. That way you avoid
|
||||
waking the target task multiple times if there were multiple packets
|
||||
for the same task.
|
||||
|
||||
Properties of a wake_q are:
|
||||
- Lockless, as queue head must reside on the stack.
|
||||
- Being a queue, maintains wakeup order passed by the callers. This can
|
||||
be important for otherwise, in scenarios where highly contended locks
|
||||
could affect any reliance on lock fairness.
|
||||
- A queued task cannot be added again until it is woken up.
|
||||
|
||||
This patch adds the needed infrastructure into the scheduler code
|
||||
and uses the new wake_list to delay the futex wakeups until
|
||||
after we've released the hash bucket locks.
|
||||
|
||||
Cc: stable-rt@vger.kernel.org
|
||||
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
|
||||
[tweaks, adjustments, comments, etc.]
|
||||
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
|
||||
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
|
||||
Acked-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Cc: Borislav Petkov <bp@alien8.de>
|
||||
Cc: Chris Mason <clm@fb.com>
|
||||
Cc: Davidlohr Bueso <dave@stgolabs.net>
|
||||
Cc: George Spelvin <linux@horizon.com>
|
||||
Cc: H. Peter Anvin <hpa@zytor.com>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Manfred Spraul <manfred@colorfullife.com>
|
||||
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Cc: Steven Rostedt <rostedt@goodmis.org>
|
||||
Link: http://lkml.kernel.org/r/1430494072-30283-2-git-send-email-dave@stgolabs.net
|
||||
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
include/linux/sched.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
kernel/sched/core.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 92 insertions(+)
|
||||
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -907,6 +907,50 @@ enum cpu_idle_type {
|
||||
#define SCHED_CAPACITY_SCALE (1L << SCHED_CAPACITY_SHIFT)
|
||||
|
||||
/*
|
||||
+ * Wake-queues are lists of tasks with a pending wakeup, whose
|
||||
+ * callers have already marked the task as woken internally,
|
||||
+ * and can thus carry on. A common use case is being able to
|
||||
+ * do the wakeups once the corresponding user lock as been
|
||||
+ * released.
|
||||
+ *
|
||||
+ * We hold reference to each task in the list across the wakeup,
|
||||
+ * thus guaranteeing that the memory is still valid by the time
|
||||
+ * the actual wakeups are performed in wake_up_q().
|
||||
+ *
|
||||
+ * One per task suffices, because there's never a need for a task to be
|
||||
+ * in two wake queues simultaneously; it is forbidden to abandon a task
|
||||
+ * in a wake queue (a call to wake_up_q() _must_ follow), so if a task is
|
||||
+ * already in a wake queue, the wakeup will happen soon and the second
|
||||
+ * waker can just skip it.
|
||||
+ *
|
||||
+ * The WAKE_Q macro declares and initializes the list head.
|
||||
+ * wake_up_q() does NOT reinitialize the list; it's expected to be
|
||||
+ * called near the end of a function, where the fact that the queue is
|
||||
+ * not used again will be easy to see by inspection.
|
||||
+ *
|
||||
+ * Note that this can cause spurious wakeups. schedule() callers
|
||||
+ * must ensure the call is done inside a loop, confirming that the
|
||||
+ * wakeup condition has in fact occurred.
|
||||
+ */
|
||||
+struct wake_q_node {
|
||||
+ struct wake_q_node *next;
|
||||
+};
|
||||
+
|
||||
+struct wake_q_head {
|
||||
+ struct wake_q_node *first;
|
||||
+ struct wake_q_node **lastp;
|
||||
+};
|
||||
+
|
||||
+#define WAKE_Q_TAIL ((struct wake_q_node *) 0x01)
|
||||
+
|
||||
+#define WAKE_Q(name) \
|
||||
+ struct wake_q_head name = { WAKE_Q_TAIL, &name.first }
|
||||
+
|
||||
+extern void wake_q_add(struct wake_q_head *head,
|
||||
+ struct task_struct *task);
|
||||
+extern void wake_up_q(struct wake_q_head *head);
|
||||
+
|
||||
+/*
|
||||
* sched-domains (multiprocessor balancing) declarations:
|
||||
*/
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -1505,6 +1549,8 @@ struct task_struct {
|
||||
/* Protection of the PI data structures: */
|
||||
raw_spinlock_t pi_lock;
|
||||
|
||||
+ struct wake_q_node wake_q;
|
||||
+
|
||||
#ifdef CONFIG_RT_MUTEXES
|
||||
/* PI waiters blocked on a rt_mutex held by this task */
|
||||
struct rb_root pi_waiters;
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -538,6 +538,52 @@ static bool set_nr_if_polling(struct tas
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+void wake_q_add(struct wake_q_head *head, struct task_struct *task)
|
||||
+{
|
||||
+ struct wake_q_node *node = &task->wake_q;
|
||||
+
|
||||
+ /*
|
||||
+ * Atomically grab the task, if ->wake_q is !nil already it means
|
||||
+ * its already queued (either by us or someone else) and will get the
|
||||
+ * wakeup due to that.
|
||||
+ *
|
||||
+ * This cmpxchg() implies a full barrier, which pairs with the write
|
||||
+ * barrier implied by the wakeup in wake_up_list().
|
||||
+ */
|
||||
+ if (cmpxchg(&node->next, NULL, WAKE_Q_TAIL))
|
||||
+ return;
|
||||
+
|
||||
+ get_task_struct(task);
|
||||
+
|
||||
+ /*
|
||||
+ * The head is context local, there can be no concurrency.
|
||||
+ */
|
||||
+ *head->lastp = node;
|
||||
+ head->lastp = &node->next;
|
||||
+}
|
||||
+
|
||||
+void wake_up_q(struct wake_q_head *head)
|
||||
+{
|
||||
+ struct wake_q_node *node = head->first;
|
||||
+
|
||||
+ while (node != WAKE_Q_TAIL) {
|
||||
+ struct task_struct *task;
|
||||
+
|
||||
+ task = container_of(node, struct task_struct, wake_q);
|
||||
+ BUG_ON(!task);
|
||||
+ /* task can safely be re-inserted now */
|
||||
+ node = node->next;
|
||||
+ task->wake_q.next = NULL;
|
||||
+
|
||||
+ /*
|
||||
+ * wake_up_process() implies a wmb() to pair with the queueing
|
||||
+ * in wake_q_add() so as not to miss wakeups.
|
||||
+ */
|
||||
+ wake_up_process(task);
|
||||
+ put_task_struct(task);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* resched_curr - mark rq's current task 'to be rescheduled now'.
|
||||
*
|
|
@ -2,7 +2,7 @@ From d6a6675d436897cd1b09e299436df3499abd753e Mon Sep 17 00:00:00 2001
|
|||
From: Allen Pais <allen.pais@oracle.com>
|
||||
Date: Fri, 13 Dec 2013 09:44:41 +0530
|
||||
Subject: [PATCH 1/3] sparc64: use generic rwsem spinlocks rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Allen Pais <allen.pais@oracle.com>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:06 +0200
|
||||
Subject: [PATCH 01/14] uaccess: count pagefault_disable() levels in
|
||||
pagefault_disabled
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Until now, pagefault_disable()/pagefault_enabled() used the preempt
|
||||
count to track whether in an environment with pagefaults disabled (can
|
||||
|
|
|
@ -2,7 +2,7 @@ From d76d3ed5cc944776ea2d42e5d49af58a86402f12 Mon Sep 17 00:00:00 2001
|
|||
From: Anders Roxell <anders.roxell@linaro.org>
|
||||
Date: Mon, 27 Apr 2015 22:53:09 +0200
|
||||
Subject: [PATCH 2/3] arm64: Allow forced irq threading
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Now its safe to allow forced interrupt threading for arm64,
|
||||
all timer interrupts and the perf interrupt are marked NO_THREAD, as is
|
||||
|
|
|
@ -0,0 +1,182 @@
|
|||
From 783ec42143b22999b03f228d5658207136c1d945 Mon Sep 17 00:00:00 2001
|
||||
From: Davidlohr Bueso <dave@stgolabs.net>
|
||||
Date: Fri, 1 May 2015 08:27:51 -0700
|
||||
Subject: [PATCH 2/2] futex: Implement lockless wakeups
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Given the overall futex architecture, any chance of reducing
|
||||
hb->lock contention is welcome. In this particular case, using
|
||||
wake-queues to enable lockless wakeups addresses very much real
|
||||
world performance concerns, even cases of soft-lockups in cases
|
||||
of large amounts of blocked tasks (which is not hard to find in
|
||||
large boxes, using but just a handful of futex).
|
||||
|
||||
At the lowest level, this patch can reduce latency of a single thread
|
||||
attempting to acquire hb->lock in highly contended scenarios by a
|
||||
up to 2x. At lower counts of nr_wake there are no regressions,
|
||||
confirming, of course, that the wake_q handling overhead is practically
|
||||
non existent. For instance, while a fair amount of variation,
|
||||
the extended pef-bench wakeup benchmark shows for a 20 core machine
|
||||
the following avg per-thread time to wakeup its share of tasks:
|
||||
|
||||
nr_thr ms-before ms-after
|
||||
16 0.0590 0.0215
|
||||
32 0.0396 0.0220
|
||||
48 0.0417 0.0182
|
||||
64 0.0536 0.0236
|
||||
80 0.0414 0.0097
|
||||
96 0.0672 0.0152
|
||||
|
||||
Naturally, this can cause spurious wakeups. However there is no core code
|
||||
that cannot handle them afaict, and furthermore tglx does have the point
|
||||
that other events can already trigger them anyway.
|
||||
|
||||
Cc: stable-rt@vger.kernel.org
|
||||
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
|
||||
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
|
||||
Acked-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Cc: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: Borislav Petkov <bp@alien8.de>
|
||||
Cc: Chris Mason <clm@fb.com>
|
||||
Cc: Davidlohr Bueso <dave@stgolabs.net>
|
||||
Cc: George Spelvin <linux@horizon.com>
|
||||
Cc: H. Peter Anvin <hpa@zytor.com>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Manfred Spraul <manfred@colorfullife.com>
|
||||
Cc: Peter Zijlstra <peterz@infradead.org>
|
||||
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Cc: Steven Rostedt <rostedt@goodmis.org>
|
||||
Link: http://lkml.kernel.org/r/1430494072-30283-3-git-send-email-dave@stgolabs.net
|
||||
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
kernel/futex.c | 33 +++++++++++++++++----------------
|
||||
1 file changed, 17 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/kernel/futex.c
|
||||
+++ b/kernel/futex.c
|
||||
@@ -1090,9 +1090,11 @@ static void __unqueue_futex(struct futex
|
||||
|
||||
/*
|
||||
* The hash bucket lock must be held when this is called.
|
||||
- * Afterwards, the futex_q must not be accessed.
|
||||
+ * Afterwards, the futex_q must not be accessed. Callers
|
||||
+ * must ensure to later call wake_up_q() for the actual
|
||||
+ * wakeups to occur.
|
||||
*/
|
||||
-static void wake_futex(struct futex_q *q)
|
||||
+static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q)
|
||||
{
|
||||
struct task_struct *p = q->task;
|
||||
|
||||
@@ -1100,14 +1102,10 @@ static void wake_futex(struct futex_q *q
|
||||
return;
|
||||
|
||||
/*
|
||||
- * We set q->lock_ptr = NULL _before_ we wake up the task. If
|
||||
- * a non-futex wake up happens on another CPU then the task
|
||||
- * might exit and p would dereference a non-existing task
|
||||
- * struct. Prevent this by holding a reference on p across the
|
||||
- * wake up.
|
||||
+ * Queue the task for later wakeup for after we've released
|
||||
+ * the hb->lock. wake_q_add() grabs reference to p.
|
||||
*/
|
||||
- get_task_struct(p);
|
||||
-
|
||||
+ wake_q_add(wake_q, p);
|
||||
__unqueue_futex(q);
|
||||
/*
|
||||
* The waiting task can free the futex_q as soon as
|
||||
@@ -1117,9 +1115,6 @@ static void wake_futex(struct futex_q *q
|
||||
*/
|
||||
smp_wmb();
|
||||
q->lock_ptr = NULL;
|
||||
-
|
||||
- wake_up_state(p, TASK_NORMAL);
|
||||
- put_task_struct(p);
|
||||
}
|
||||
|
||||
static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this)
|
||||
@@ -1217,6 +1212,7 @@ futex_wake(u32 __user *uaddr, unsigned i
|
||||
struct futex_q *this, *next;
|
||||
union futex_key key = FUTEX_KEY_INIT;
|
||||
int ret;
|
||||
+ WAKE_Q(wake_q);
|
||||
|
||||
if (!bitset)
|
||||
return -EINVAL;
|
||||
@@ -1244,13 +1240,14 @@ futex_wake(u32 __user *uaddr, unsigned i
|
||||
if (!(this->bitset & bitset))
|
||||
continue;
|
||||
|
||||
- wake_futex(this);
|
||||
+ mark_wake_futex(&wake_q, this);
|
||||
if (++ret >= nr_wake)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock(&hb->lock);
|
||||
+ wake_up_q(&wake_q);
|
||||
out_put_key:
|
||||
put_futex_key(&key);
|
||||
out:
|
||||
@@ -1269,6 +1266,7 @@ futex_wake_op(u32 __user *uaddr1, unsign
|
||||
struct futex_hash_bucket *hb1, *hb2;
|
||||
struct futex_q *this, *next;
|
||||
int ret, op_ret;
|
||||
+ WAKE_Q(wake_q);
|
||||
|
||||
retry:
|
||||
ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, VERIFY_READ);
|
||||
@@ -1320,7 +1318,7 @@ futex_wake_op(u32 __user *uaddr1, unsign
|
||||
ret = -EINVAL;
|
||||
goto out_unlock;
|
||||
}
|
||||
- wake_futex(this);
|
||||
+ mark_wake_futex(&wake_q, this);
|
||||
if (++ret >= nr_wake)
|
||||
break;
|
||||
}
|
||||
@@ -1334,7 +1332,7 @@ futex_wake_op(u32 __user *uaddr1, unsign
|
||||
ret = -EINVAL;
|
||||
goto out_unlock;
|
||||
}
|
||||
- wake_futex(this);
|
||||
+ mark_wake_futex(&wake_q, this);
|
||||
if (++op_ret >= nr_wake2)
|
||||
break;
|
||||
}
|
||||
@@ -1344,6 +1342,7 @@ futex_wake_op(u32 __user *uaddr1, unsign
|
||||
|
||||
out_unlock:
|
||||
double_unlock_hb(hb1, hb2);
|
||||
+ wake_up_q(&wake_q);
|
||||
out_put_keys:
|
||||
put_futex_key(&key2);
|
||||
out_put_key1:
|
||||
@@ -1503,6 +1502,7 @@ static int futex_requeue(u32 __user *uad
|
||||
struct futex_pi_state *pi_state = NULL;
|
||||
struct futex_hash_bucket *hb1, *hb2;
|
||||
struct futex_q *this, *next;
|
||||
+ WAKE_Q(wake_q);
|
||||
|
||||
if (requeue_pi) {
|
||||
/*
|
||||
@@ -1679,7 +1679,7 @@ static int futex_requeue(u32 __user *uad
|
||||
* woken by futex_unlock_pi().
|
||||
*/
|
||||
if (++task_count <= nr_wake && !requeue_pi) {
|
||||
- wake_futex(this);
|
||||
+ mark_wake_futex(&wake_q, this);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1719,6 +1719,7 @@ static int futex_requeue(u32 __user *uad
|
||||
out_unlock:
|
||||
free_pi_state(pi_state);
|
||||
double_unlock_hb(hb1, hb2);
|
||||
+ wake_up_q(&wake_q);
|
||||
hb_waiters_dec(hb2);
|
||||
|
||||
/*
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Tue, 19 Mar 2013 14:44:30 +0100
|
||||
Subject: [PATCH] kernel/SRCU: provide a static initializer
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
There are macros for static initializer for the three out of four
|
||||
possible notifier types, that are:
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:07 +0200
|
||||
Subject: [PATCH 02/14] mm, uaccess: trigger might_sleep() in might_fault()
|
||||
with disabled pagefaults
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with
|
||||
pagefault_disable()") removed might_sleep() checks for all user access
|
||||
|
|
|
@ -2,7 +2,7 @@ From 65513f34449eedb6b84c24a3583266534c1627e4 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 11 Mar 2013 17:09:55 +0100
|
||||
Subject: [PATCH 2/6] x86/highmem: add a "already used pte" check
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This is a copy from kmap_atomic_prot().
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From e2ca4d092d9c6e6b07b465b4d81da207bbcc7437 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 11 Mar 2013 21:37:27 +0100
|
||||
Subject: [PATCH 3/6] arm/highmem: flush tlb on unmap
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The tlb should be flushed on unmap and thus make the mapping entry
|
||||
invalid. This is only done in the non-debug case which does not look
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:08 +0200
|
||||
Subject: [PATCH 03/14] uaccess: clarify that uaccess may only sleep if
|
||||
pagefaults are enabled
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
In general, non-atomic variants of user access functions must not sleep
|
||||
if pagefaults are disabled.
|
||||
|
|
184
debian/patches/features/all/rt/0004-ipc-mqueue-Implement-lockless-pipelined-wakeups.patch
vendored
Normal file
184
debian/patches/features/all/rt/0004-ipc-mqueue-Implement-lockless-pipelined-wakeups.patch
vendored
Normal file
|
@ -0,0 +1,184 @@
|
|||
From fa6004ad4528153b699a4d5ce5ea6b33acce74cc Mon Sep 17 00:00:00 2001
|
||||
From: Davidlohr Bueso <dave@stgolabs.net>
|
||||
Date: Mon, 4 May 2015 07:02:46 -0700
|
||||
Subject: [PATCH 4/4] ipc/mqueue: Implement lockless pipelined wakeups
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This patch moves the wakeup_process() invocation so it is not done under
|
||||
the info->lock by making use of a lockless wake_q. With this change, the
|
||||
waiter is woken up once it is STATE_READY and it does not need to loop
|
||||
on SMP if it is still in STATE_PENDING. In the timeout case we still need
|
||||
to grab the info->lock to verify the state.
|
||||
|
||||
This change should also avoid the introduction of preempt_disable() in -rt
|
||||
which avoids a busy-loop which pools for the STATE_PENDING -> STATE_READY
|
||||
change if the waiter has a higher priority compared to the waker.
|
||||
|
||||
Additionally, this patch micro-optimizes wq_sleep by using the cheaper
|
||||
cousin of set_current_state(TASK_INTERRUPTABLE) as we will block no
|
||||
matter what, thus get rid of the implied barrier.
|
||||
|
||||
Cc: stable-rt@vger.kernel.org
|
||||
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
|
||||
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
|
||||
Acked-by: George Spelvin <linux@horizon.com>
|
||||
Acked-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Cc: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: Borislav Petkov <bp@alien8.de>
|
||||
Cc: Chris Mason <clm@fb.com>
|
||||
Cc: H. Peter Anvin <hpa@zytor.com>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Manfred Spraul <manfred@colorfullife.com>
|
||||
Cc: Peter Zijlstra <peterz@infradead.org>
|
||||
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Cc: Steven Rostedt <rostedt@goodmis.org>
|
||||
Cc: dave@stgolabs.net
|
||||
Link: http://lkml.kernel.org/r/1430748166.1940.17.camel@stgolabs.net
|
||||
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
ipc/mqueue.c | 54 +++++++++++++++++++++++++++++++++---------------------
|
||||
1 file changed, 33 insertions(+), 21 deletions(-)
|
||||
|
||||
--- a/ipc/mqueue.c
|
||||
+++ b/ipc/mqueue.c
|
||||
@@ -47,8 +47,7 @@
|
||||
#define RECV 1
|
||||
|
||||
#define STATE_NONE 0
|
||||
-#define STATE_PENDING 1
|
||||
-#define STATE_READY 2
|
||||
+#define STATE_READY 1
|
||||
|
||||
struct posix_msg_tree_node {
|
||||
struct rb_node rb_node;
|
||||
@@ -571,15 +570,12 @@ static int wq_sleep(struct mqueue_inode_
|
||||
wq_add(info, sr, ewp);
|
||||
|
||||
for (;;) {
|
||||
- set_current_state(TASK_INTERRUPTIBLE);
|
||||
+ __set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
spin_unlock(&info->lock);
|
||||
time = schedule_hrtimeout_range_clock(timeout, 0,
|
||||
HRTIMER_MODE_ABS, CLOCK_REALTIME);
|
||||
|
||||
- while (ewp->state == STATE_PENDING)
|
||||
- cpu_relax();
|
||||
-
|
||||
if (ewp->state == STATE_READY) {
|
||||
retval = 0;
|
||||
goto out;
|
||||
@@ -907,11 +903,15 @@ SYSCALL_DEFINE1(mq_unlink, const char __
|
||||
* list of waiting receivers. A sender checks that list before adding the new
|
||||
* message into the message array. If there is a waiting receiver, then it
|
||||
* bypasses the message array and directly hands the message over to the
|
||||
- * receiver.
|
||||
- * The receiver accepts the message and returns without grabbing the queue
|
||||
- * spinlock. Therefore an intermediate STATE_PENDING state and memory barriers
|
||||
- * are necessary. The same algorithm is used for sysv semaphores, see
|
||||
- * ipc/sem.c for more details.
|
||||
+ * receiver. The receiver accepts the message and returns without grabbing the
|
||||
+ * queue spinlock:
|
||||
+ *
|
||||
+ * - Set pointer to message.
|
||||
+ * - Queue the receiver task for later wakeup (without the info->lock).
|
||||
+ * - Update its state to STATE_READY. Now the receiver can continue.
|
||||
+ * - Wake up the process after the lock is dropped. Should the process wake up
|
||||
+ * before this wakeup (due to a timeout or a signal) it will either see
|
||||
+ * STATE_READY and continue or acquire the lock to check the state again.
|
||||
*
|
||||
* The same algorithm is used for senders.
|
||||
*/
|
||||
@@ -919,21 +919,29 @@ SYSCALL_DEFINE1(mq_unlink, const char __
|
||||
/* pipelined_send() - send a message directly to the task waiting in
|
||||
* sys_mq_timedreceive() (without inserting message into a queue).
|
||||
*/
|
||||
-static inline void pipelined_send(struct mqueue_inode_info *info,
|
||||
+static inline void pipelined_send(struct wake_q_head *wake_q,
|
||||
+ struct mqueue_inode_info *info,
|
||||
struct msg_msg *message,
|
||||
struct ext_wait_queue *receiver)
|
||||
{
|
||||
receiver->msg = message;
|
||||
list_del(&receiver->list);
|
||||
- receiver->state = STATE_PENDING;
|
||||
- wake_up_process(receiver->task);
|
||||
- smp_wmb();
|
||||
+ wake_q_add(wake_q, receiver->task);
|
||||
+ /*
|
||||
+ * Rely on the implicit cmpxchg barrier from wake_q_add such
|
||||
+ * that we can ensure that updating receiver->state is the last
|
||||
+ * write operation: As once set, the receiver can continue,
|
||||
+ * and if we don't have the reference count from the wake_q,
|
||||
+ * yet, at that point we can later have a use-after-free
|
||||
+ * condition and bogus wakeup.
|
||||
+ */
|
||||
receiver->state = STATE_READY;
|
||||
}
|
||||
|
||||
/* pipelined_receive() - if there is task waiting in sys_mq_timedsend()
|
||||
* gets its message and put to the queue (we have one free place for sure). */
|
||||
-static inline void pipelined_receive(struct mqueue_inode_info *info)
|
||||
+static inline void pipelined_receive(struct wake_q_head *wake_q,
|
||||
+ struct mqueue_inode_info *info)
|
||||
{
|
||||
struct ext_wait_queue *sender = wq_get_first_waiter(info, SEND);
|
||||
|
||||
@@ -944,10 +952,9 @@ static inline void pipelined_receive(str
|
||||
}
|
||||
if (msg_insert(sender->msg, info))
|
||||
return;
|
||||
+
|
||||
list_del(&sender->list);
|
||||
- sender->state = STATE_PENDING;
|
||||
- wake_up_process(sender->task);
|
||||
- smp_wmb();
|
||||
+ wake_q_add(wake_q, sender->task);
|
||||
sender->state = STATE_READY;
|
||||
}
|
||||
|
||||
@@ -965,6 +972,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqd
|
||||
struct timespec ts;
|
||||
struct posix_msg_tree_node *new_leaf = NULL;
|
||||
int ret = 0;
|
||||
+ WAKE_Q(wake_q);
|
||||
|
||||
if (u_abs_timeout) {
|
||||
int res = prepare_timeout(u_abs_timeout, &expires, &ts);
|
||||
@@ -1049,7 +1057,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqd
|
||||
} else {
|
||||
receiver = wq_get_first_waiter(info, RECV);
|
||||
if (receiver) {
|
||||
- pipelined_send(info, msg_ptr, receiver);
|
||||
+ pipelined_send(&wake_q, info, msg_ptr, receiver);
|
||||
} else {
|
||||
/* adds message to the queue */
|
||||
ret = msg_insert(msg_ptr, info);
|
||||
@@ -1062,6 +1070,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqd
|
||||
}
|
||||
out_unlock:
|
||||
spin_unlock(&info->lock);
|
||||
+ wake_up_q(&wake_q);
|
||||
out_free:
|
||||
if (ret)
|
||||
free_msg(msg_ptr);
|
||||
@@ -1149,14 +1158,17 @@ SYSCALL_DEFINE5(mq_timedreceive, mqd_t,
|
||||
msg_ptr = wait.msg;
|
||||
}
|
||||
} else {
|
||||
+ WAKE_Q(wake_q);
|
||||
+
|
||||
msg_ptr = msg_get(info);
|
||||
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime =
|
||||
CURRENT_TIME;
|
||||
|
||||
/* There is now free space in queue. */
|
||||
- pipelined_receive(info);
|
||||
+ pipelined_receive(&wake_q, info);
|
||||
spin_unlock(&info->lock);
|
||||
+ wake_up_q(&wake_q);
|
||||
ret = 0;
|
||||
}
|
||||
if (ret == 0) {
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:09 +0200
|
||||
Subject: [PATCH 04/14] mm: explicitly disable/enable preemption in
|
||||
kmap_atomic_*
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The existing code relies on pagefault_disable() implicitly disabling
|
||||
preemption, so that no schedule will happen between kmap_atomic() and
|
||||
|
|
|
@ -3,7 +3,7 @@ From: Thomas Gleixner <tglx@linutronix.de>
|
|||
Date: Fri, 1 Mar 2013 11:17:42 +0100
|
||||
Subject: [PATCH 5/6] futex: Ensure lock/unlock symetry versus pi_lock and
|
||||
hash bucket lock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
In exit_pi_state_list() we have the following locking construct:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From 91021aa7ea1469d0b3127e68d177e0ad58a7eda3 Mon Sep 17 00:00:00 2001
|
|||
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
||||
Date: Mon, 11 May 2015 17:52:10 +0200
|
||||
Subject: [PATCH 05/14] mips: kmap_coherent relies on disabled preemption
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
k(un)map_coherent relies on pagefault_disable() to also disable
|
||||
preemption.
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:11 +0200
|
||||
Subject: [PATCH 06/14] mm: use pagefault_disable() to check for disabled
|
||||
pagefaults in the handler
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Introduce faulthandler_disabled() and use it to check for irq context and
|
||||
disabled pagefaults (via pagefault_disable()) in the pagefault handlers.
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:12 +0200
|
||||
Subject: [PATCH 07/14] drm/i915: use pagefault_disabled() to check for
|
||||
disabled pagefaults
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Now that the pagefault disabled counter is in place, we can replace
|
||||
the in_atomic() check by a pagefault_disabled() checks.
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:13 +0200
|
||||
Subject: [PATCH 08/14] futex: UP futex_atomic_op_inuser() relies on disabled
|
||||
preemption
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Let's explicitly disable/enable preemption in the !CONFIG_SMP version
|
||||
of futex_atomic_op_inuser, to prepare for pagefault_disable() not
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:14 +0200
|
||||
Subject: [PATCH 09/14] futex: UP futex_atomic_cmpxchg_inatomic() relies on
|
||||
disabled preemption
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Let's explicitly disable/enable preemption in the !CONFIG_SMP version
|
||||
of futex_atomic_cmpxchg_inatomic, to prepare for pagefault_disable() not
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:15 +0200
|
||||
Subject: [PATCH 10/14] arm/futex: UP futex_atomic_cmpxchg_inatomic() relies on
|
||||
disabled preemption
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The !CONFIG_SMP implementation of futex_atomic_cmpxchg_inatomic()
|
||||
requires preemption to be disabled to guarantee mutual exclusion.
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:16 +0200
|
||||
Subject: [PATCH 11/14] arm/futex: UP futex_atomic_op_inuser() relies on
|
||||
disabled preemption
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The !CONFIG_SMP implementation of futex_atomic_op_inuser() seems to rely
|
||||
on disabled preemption to guarantee mutual exclusion.
|
||||
|
|
|
@ -3,7 +3,7 @@ From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
|||
Date: Mon, 11 May 2015 17:52:17 +0200
|
||||
Subject: [PATCH 12/14] futex: clarify that preemption doesn't have to be
|
||||
disabled
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
As arm64 and arc have no special implementations for !CONFIG_SMP, mutual
|
||||
exclusion doesn't seem to rely on preemption.
|
||||
|
|
|
@ -2,7 +2,7 @@ From 66ba6c9e2893bd2f7659286627b05c37312994db Mon Sep 17 00:00:00 2001
|
|||
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
||||
Date: Mon, 11 May 2015 17:52:19 +0200
|
||||
Subject: [PATCH 13/14] mips: properly lock access to the fpu
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Let's always disable preemption and pagefaults when locking the fpu,
|
||||
so we can be sure that the owner won't change in between.
|
||||
|
|
|
@ -2,7 +2,7 @@ From 573a49b98c80acdeb8f2b0e3990863a30900c2f7 Mon Sep 17 00:00:00 2001
|
|||
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
|
||||
Date: Mon, 11 May 2015 17:52:20 +0200
|
||||
Subject: [PATCH 14/14] uaccess: decouple preemption from the pagefault logic
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
As the fault handlers now all rely on the pagefault_disabled() checks
|
||||
and implicit preempt_disable() calls by pagefault_disable() have been
|
||||
|
|
|
@ -2,7 +2,7 @@ From 116a588e1e4b108bfd01b5ae8de602c12aec3323 Mon Sep 17 00:00:00 2001
|
|||
From: Nicholas Mc Guire <der.herr@hofr.at>
|
||||
Date: Fri, 17 Jan 2014 20:44:03 +0100
|
||||
Subject: [PATCH 7/7] API cleanup - use local_lock not __local_lock for soft
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
trivial API cleanup - kernel/softirq.c was mimiking local_lock.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ From: Yong Zhang <yong.zhang at windriver.com>
|
|||
Date: Thu, 29 Jan 2015 12:56:18 -0600
|
||||
Subject: [PATCH] ARM: cmpxchg: define __HAVE_ARCH_CMPXCHG for armv6 and
|
||||
later
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Both pi_stress and sigwaittest in rt-test show performance gain with
|
||||
__HAVE_ARCH_CMPXCHG. Testing result on coretile_express_a9x4:
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] ARM: enable irq in translation/section permission fault
|
|||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Probably happens on all ARM, with
|
||||
CONFIG_PREEMPT_RT_FULL
|
||||
|
|
|
@ -2,7 +2,7 @@ From f407a2e976855eb4553d950f124c196061bbbd6c Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 11 Jun 2015 14:17:06 +0200
|
||||
Subject: [PATCH] ASoC: Intel: sst: use ; instead of , at the of a C statement
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This was spotted by Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
|
||||
while he tried to compile a -RT kernel with this driver enabled.
|
||||
|
|
|
@ -2,7 +2,7 @@ From b72b514282ffad0d665ea94932b968f388304079 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 21 Mar 2013 19:01:05 +0100
|
||||
Subject: [PATCH] HACK: printk: drop the logbuf_lock more often
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The lock is hold with irgs off. The latency drops 500us+ on my arm bugs
|
||||
with a "full" buffer after executing "dmesg" on the shell.
|
||||
|
|
|
@ -2,7 +2,7 @@ From d24c954fa7a252b093fa8ba9ed12c00bc3829bbe Mon Sep 17 00:00:00 2001
|
|||
From: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Date: Wed, 8 Apr 2015 20:33:25 -0300
|
||||
Subject: [PATCH 2/2] KVM: lapic: mark LAPIC timer handler as irqsafe
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Since lapic timer handler only wakes up a simple waitqueue,
|
||||
it can be executed from hardirq context.
|
||||
|
|
|
@ -2,7 +2,7 @@ From 73a22bd9fee012b115222b6b20b42fd8f581a089 Mon Sep 17 00:00:00 2001
|
|||
From: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Date: Wed, 8 Apr 2015 20:33:24 -0300
|
||||
Subject: [PATCH 1/2] KVM: use simple waitqueue for vcpu->wq
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The problem:
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
Date: Fri, 2 May 2014 17:32:30 +0200
|
||||
Subject: [PATCH] Revert "migrate_disable pushd down in
|
||||
atomic_dec_and_spin_lock"
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This reverts commit ff9c870c3e27d58c9512fad122e91436681fee5a.
|
||||
Cc: stable-rt@vger.kernel.org
|
||||
|
|
|
@ -2,7 +2,7 @@ From 1db4ce56001465fba240916d0c8de7443cafec62 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 25 Feb 2015 12:16:43 +0100
|
||||
Subject: [PATCH] Revert "rwsem-rt: Do not allow readers to nest"
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This behaviour is required by cpufreq and its logic is "okay": It does a
|
||||
read_lock followed by a try_read_lock.
|
||||
|
|
49
debian/patches/features/all/rt/Revert-slub-delay-ctor-until-the-object-is-requested.patch
vendored
Normal file
49
debian/patches/features/all/rt/Revert-slub-delay-ctor-until-the-object-is-requested.patch
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 13 Jul 2015 13:08:25 +0200
|
||||
Subject: Revert "slub: delay ctor until the object is requested"
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This approach is broken with SLAB_DESTROY_BY_RCU allocations.
|
||||
Reported by Steven Rostedt and Koehrer Mathias.
|
||||
|
||||
Cc: stable-rt@vger.kernel.org
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
mm/slub.c | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/mm/slub.c b/mm/slub.c
|
||||
index ea83736be12c..6d7f5165a634 100644
|
||||
--- a/mm/slub.c
|
||||
+++ b/mm/slub.c
|
||||
@@ -1411,13 +1411,11 @@ static void setup_object(struct kmem_cache *s, struct page *page,
|
||||
void *object)
|
||||
{
|
||||
setup_object_debug(s, page, object);
|
||||
-#ifndef CONFIG_PREEMPT_RT_FULL
|
||||
if (unlikely(s->ctor)) {
|
||||
kasan_unpoison_object_data(s, object);
|
||||
s->ctor(object);
|
||||
kasan_poison_object_data(s, object);
|
||||
}
|
||||
-#endif
|
||||
}
|
||||
|
||||
static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
|
||||
@@ -2562,13 +2560,6 @@ static __always_inline void *slab_alloc_node(struct kmem_cache *s,
|
||||
|
||||
if (unlikely(gfpflags & __GFP_ZERO) && object)
|
||||
memset(object, 0, s->object_size);
|
||||
-#ifdef CONFIG_PREEMPT_RT_FULL
|
||||
- if (unlikely(s->ctor) && object) {
|
||||
- kasan_unpoison_object_data(s, object);
|
||||
- s->ctor(object);
|
||||
- kasan_poison_object_data(s, object);
|
||||
- }
|
||||
-#endif
|
||||
|
||||
slab_post_alloc_hook(s, gfpflags, object);
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Revert "timers: do not raise softirq unconditionally"
|
|||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The patch I revert here triggers the HRtimer switch from hardirq instead
|
||||
of from softirq. As a result we get a periodic interrupt before the
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Date: Wed, 13 Feb 2013 09:26:05 -0500
|
||||
Subject: [PATCH] acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
We hit the following bug with 3.6-rt:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From 155cf657f6ddcade424253eb58d03a170dc9f64f Mon Sep 17 00:00:00 2001
|
|||
From: Nicholas Mc Guire <der.herr@hofr.at>
|
||||
Date: Wed, 20 Nov 2013 07:22:09 +0800
|
||||
Subject: [PATCH 1/2] allow preemption in recursive migrate_disable call
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Minor cleanup in migrate_disable/migrate_enable. The recursive case
|
||||
does not need to disable preemption as it is "pinned" to the current
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -2757,13 +2757,12 @@ void migrate_disable(void)
|
||||
@@ -2803,13 +2803,12 @@ void migrate_disable(void)
|
||||
WARN_ON_ONCE(p->migrate_disable_atomic);
|
||||
#endif
|
||||
|
||||
|
@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
pin_current_cpu();
|
||||
p->migrate_disable = 1;
|
||||
preempt_enable();
|
||||
@@ -2789,13 +2788,12 @@ void migrate_enable(void)
|
||||
@@ -2835,13 +2834,12 @@ void migrate_enable(void)
|
||||
#endif
|
||||
WARN_ON_ONCE(p->migrate_disable <= 0);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From 7400b8761276c4b41581abc39ecd587f51856398 Mon Sep 17 00:00:00 2001
|
|||
From: Anders Roxell <anders.roxell@linaro.org>
|
||||
Date: Thu, 14 May 2015 17:52:17 +0200
|
||||
Subject: [PATCH 3/3] arch/arm64: Add lazy preempt support
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
arm64 is missing support for PREEMPT_RT. The main feature which is
|
||||
lacking is support for lazy preemption. The arch-specific entry code,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Benedikt Spranger <b.spranger@linutronix.de>
|
||||
Date: Sat, 6 Mar 2010 17:47:10 +0100
|
||||
Subject: ARM: AT91: PIT: Remove irq handler when clock event is unused
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Setup and remove the interrupt handler in clock event mode selection.
|
||||
This avoids calling the (shared) interrupt handler when the device is
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sat, 1 May 2010 18:29:35 +0200
|
||||
Subject: ARM: at91: tclib: Default to tclib timer for RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
RT is not too happy about the shared timer interrupt in AT91
|
||||
devices. Default to tclib timer for RT.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Frank Rowand <frank.rowand@am.sony.com>
|
||||
Date: Mon, 19 Sep 2011 14:51:14 -0700
|
||||
Subject: [PATCH] preempt-rt: Convert arm boot_lock to raw
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The arm boot_lock is used by the secondary processor startup code. The locking
|
||||
task is the idle thread, which has idle->sched_class == &idle_sched_class.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: arm-disable-highmem-on-rt.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Mon, 18 Jul 2011 17:09:28 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: arm-enable-highmem-for-rt.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 13 Feb 2013 11:03:11 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: arm-preempt-lazy-support.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 31 Oct 2012 12:04:11 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH RT] arm/unwind: use a raw_spin_lock
|
|||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Mostly unwind is done with irqs enabled however SLUB may call it with
|
||||
irqs disabled while creating a new SLUB cache.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Steven Rostedt <srostedt@redhat.com>
|
||||
Date: Fri, 3 Jul 2009 08:44:29 -0500
|
||||
Subject: ata: Do not disable interrupts in ide code for preempt-rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Use the local_irq_*_nort variants.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From de8fa902784181346b91bd121fba824a588fa99c Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Sat, 3 May 2014 11:00:29 +0200
|
||||
Subject: [PATCH] blk-mq: revert raw locks, post pone notifier to POST_DEAD
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The blk_mq_cpu_notify_lock should be raw because some CPU down levels
|
||||
are called with interrupts off. The notifier itself calls currently one
|
||||
|
|
|
@ -2,7 +2,7 @@ From 707f90fbaa66cfe72a8543121474edce9319d9d6 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 13 Feb 2015 11:01:26 +0100
|
||||
Subject: [PATCH] block: blk-mq: use swait
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
| BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914
|
||||
| in_atomic(): 1, irqs_disabled(): 0, pid: 255, name: kworker/u257:6
|
||||
|
|
|
@ -2,7 +2,7 @@ From 9945a1974d877a9accfd623dcfe78ffd9dd7bb86 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 29 Jan 2015 15:10:08 +0100
|
||||
Subject: [PATCH] block/mq: don't complete requests via IPI
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The IPI runs in hardirq context and there are sleeping locks. This patch
|
||||
moves the completion into a workqueue.
|
||||
|
|
|
@ -2,7 +2,7 @@ From 58fe6c3ba939278c159dfe7152889667b2685ea9 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 18 Feb 2015 18:37:26 +0100
|
||||
Subject: [PATCH] block/mq: drop per ctx cpu_lock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
While converting the get_cpu() to get_cpu_light() I added a cpu lock to
|
||||
ensure the same code is not invoked twice on the same CPU. And now I run
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Subject: block/mq: do not invoke preempt_disable()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
preempt_disable() and get_cpu() don't play well together with the sleeping
|
||||
locks it tries to allocate later.
|
||||
|
|
|
@ -2,7 +2,7 @@ From 7632d1dd96f75bdba997003fa61ab14e57afb0fe Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 9 Apr 2014 10:37:23 +0200
|
||||
Subject: [PATCH 5/5] block: mq: use cpu_light()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
there is a might sleep splat because get_cpu() disables preemption and
|
||||
later we grab a lock. As a workaround for this we use get_cpu_light()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: block: Shorten interrupt disabled regions
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 22 Jun 2011 19:47:02 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Moving the blk_sched_flush_plug() call out of the interrupt/preempt
|
||||
disabled region in the scheduler allows us to replace
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: block: Use cpu_chill() for retry loops
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Thu, 20 Dec 2012 18:28:26 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Retry loops on RT might loop forever when the modifying side was
|
||||
preempted. Steven also observed a live lock when there was a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Ingo Molnar <mingo@elte.hu>
|
||||
Date: Fri, 3 Jul 2009 08:29:58 -0500
|
||||
Subject: bug: BUG_ON/WARN_ON variants dependend on RT/!RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Ingo Molnar <mingo@elte.hu>
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
|
|
|
@ -2,7 +2,7 @@ From eebd25188161f4e2079676e1db2f613375cfebf0 Mon Sep 17 00:00:00 2001
|
|||
From: Mike Galbraith <umgwanakikbuti@gmail.com>
|
||||
Date: Sat, 21 Jun 2014 10:09:48 +0200
|
||||
Subject: [PATCH] scheduling while atomic in cgroup code
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
mm, memcg: make refill_stock() use get_cpu_light()
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From 11a11a8da86fcba45725b4786bce03189d9ff2f9 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 13 Feb 2015 15:52:24 +0100
|
||||
Subject: [PATCH 2/2] cgroups: use simple wait in css_release()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
To avoid:
|
||||
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Benedikt Spranger <b.spranger@linutronix.de>
|
||||
Date: Mon, 8 Mar 2010 18:57:04 +0100
|
||||
Subject: clocksource: TCLIB: Allow higher clock rates for clock events
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
As default the TCLIB uses the 32KiHz base clock rate for clock events.
|
||||
Add a compile time selection to allow higher clock resulution.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: completion: Use simple wait queues
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 11 Jan 2013 11:23:51 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Completions have no long lasting callbacks and therefor do not need
|
||||
the complex waitqueue variant. Use simple waitqueues which reduces the
|
||||
|
@ -154,7 +154,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
EXPORT_SYMBOL(completion_done);
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -2767,7 +2767,10 @@ void migrate_disable(void)
|
||||
@@ -2813,7 +2813,10 @@ void migrate_disable(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCHED_DEBUG
|
||||
|
@ -166,7 +166,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
#endif
|
||||
|
||||
if (p->migrate_disable) {
|
||||
@@ -2798,7 +2801,10 @@ void migrate_enable(void)
|
||||
@@ -2844,7 +2847,10 @@ void migrate_enable(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCHED_DEBUG
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: cond-resched-lock-rt-tweak.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 17 Jul 2011 22:51:33 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -2918,7 +2918,7 @@ extern int _cond_resched(void);
|
||||
@@ -2964,7 +2964,7 @@ extern int _cond_resched(void);
|
||||
|
||||
extern int __cond_resched_lock(spinlock_t *lock);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: cond-resched-softirq-fix.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Thu, 14 Jul 2011 09:56:44 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
@ -11,7 +11,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -2929,12 +2929,16 @@ extern int __cond_resched_lock(spinlock_
|
||||
@@ -2975,12 +2975,16 @@ extern int __cond_resched_lock(spinlock_
|
||||
__cond_resched_lock(lock); \
|
||||
})
|
||||
|
||||
|
@ -30,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
{
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -4320,6 +4320,7 @@ int __cond_resched_lock(spinlock_t *lock
|
||||
@@ -4366,6 +4366,7 @@ int __cond_resched_lock(spinlock_t *lock
|
||||
}
|
||||
EXPORT_SYMBOL(__cond_resched_lock);
|
||||
|
||||
|
@ -38,7 +38,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
int __sched __cond_resched_softirq(void)
|
||||
{
|
||||
BUG_ON(!in_softirq());
|
||||
@@ -4333,6 +4334,7 @@ int __sched __cond_resched_softirq(void)
|
||||
@@ -4379,6 +4380,7 @@ int __sched __cond_resched_softirq(void)
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(__cond_resched_softirq);
|
||||
|
|
|
@ -2,7 +2,7 @@ From 56f43bce737d3f28ad470c95fa84f824cb0d55ad Mon Sep 17 00:00:00 2001
|
|||
From: Nicholas Mc Guire <der.herr@hofr.at>
|
||||
Date: Thu, 21 Nov 2013 22:52:30 -0500
|
||||
Subject: [PATCH 2/2] condition migration_disable on lock acquisition
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
No need to unconditionally migrate_disable (what is it protecting ?) and
|
||||
re-enable on failure to acquire the lock.
|
||||
|
|
|
@ -2,7 +2,7 @@ From 107fb2b43f5c80686ee6454713f4963728ca2737 Mon Sep 17 00:00:00 2001
|
|||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Date: Thu, 5 Dec 2013 09:16:52 -0500
|
||||
Subject: [PATCH] cpu hotplug: Document why PREEMPT_RT uses a spinlock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The patch:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: cpu: Make hotplug.lock a "sleeping" spinlock on RT
|
||||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Date: Fri, 02 Mar 2012 10:36:57 -0500
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Tasks can block on hotplug.lock in pin_current_cpu(), but their state
|
||||
might be != RUNNING. So the mutex wakeup will set the state
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Steven Rostedt <srostedt@redhat.com>
|
||||
Date: Mon, 16 Jul 2012 08:07:43 +0000
|
||||
Subject: cpu/rt: Rework cpu down for PREEMPT_RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Bringing a CPU down is a pain with the PREEMPT_RT kernel because
|
||||
tasks can be preempted in many more places than in non-RT. In
|
||||
|
@ -57,7 +57,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -2163,6 +2163,10 @@ extern void do_set_cpus_allowed(struct t
|
||||
@@ -2209,6 +2209,10 @@ extern void do_set_cpus_allowed(struct t
|
||||
|
||||
extern int set_cpus_allowed_ptr(struct task_struct *p,
|
||||
const struct cpumask *new_mask);
|
||||
|
@ -68,7 +68,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
#else
|
||||
static inline void do_set_cpus_allowed(struct task_struct *p,
|
||||
const struct cpumask *new_mask)
|
||||
@@ -2175,6 +2179,9 @@ static inline int set_cpus_allowed_ptr(s
|
||||
@@ -2221,6 +2225,9 @@ static inline int set_cpus_allowed_ptr(s
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
*/
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -2709,7 +2709,7 @@ void migrate_disable(void)
|
||||
@@ -2755,7 +2755,7 @@ void migrate_disable(void)
|
||||
{
|
||||
struct task_struct *p = current;
|
||||
|
||||
|
@ -466,7 +466,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
#ifdef CONFIG_SCHED_DEBUG
|
||||
p->migrate_disable_atomic++;
|
||||
#endif
|
||||
@@ -2739,7 +2739,7 @@ void migrate_enable(void)
|
||||
@@ -2785,7 +2785,7 @@ void migrate_enable(void)
|
||||
unsigned long flags;
|
||||
struct rq *rq;
|
||||
|
||||
|
@ -475,7 +475,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
#ifdef CONFIG_SCHED_DEBUG
|
||||
p->migrate_disable_atomic--;
|
||||
#endif
|
||||
@@ -4909,6 +4909,84 @@ void do_set_cpus_allowed(struct task_str
|
||||
@@ -4955,6 +4955,84 @@ void do_set_cpus_allowed(struct task_str
|
||||
cpumask_copy(&p->cpus_allowed, new_mask);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: cpu-rt-variants.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 17 Jun 2011 15:42:38 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -2,7 +2,7 @@ From a1b3b9eafb916f839a09dcde745518a5ad6703db Mon Sep 17 00:00:00 2001
|
|||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Date: Tue, 4 Mar 2014 12:28:32 -0500
|
||||
Subject: [PATCH] cpu_chill: Add a UNINTERRUPTIBLE hrtimer_nanosleep
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
We hit another bug that was caused by switching cpu_chill() from
|
||||
msleep() to hrtimer_nanosleep().
|
||||
|
|
|
@ -2,7 +2,7 @@ From linux-rt-users-owner@vger.kernel.org Thu Nov 7 03:07:12 2013
|
|||
From: Tiejun Chen <tiejun.chen@windriver.com>
|
||||
Subject: [v1][PATCH] cpu_down: move migrate_enable() back
|
||||
Date: Thu, 7 Nov 2013 10:06:07 +0800
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Commit 08c1ab68, "hotplug-use-migrate-disable.patch", intends to
|
||||
use migrate_enable()/migrate_disable() to replace that combination
|
||||
|
|
|
@ -2,7 +2,7 @@ From 748dfbec410da5366c04e9b85dbc11558aae1b73 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 9 Apr 2015 15:23:01 +0200
|
||||
Subject: [PATCH] cpufreq: drop K8's driver from beeing selected
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Ralf posted a picture of a backtrace from
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 14 Dec 2011 01:03:49 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
We can't deal with the cpumask allocations which happen in atomic
|
||||
context (see arch/x86/kernel/apic/io_apic.c) on RT right now.
|
||||
|
|
|
@ -2,7 +2,7 @@ From 0fcf777e2f217e61564bd30a2c39cb49d0e0b8c3 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 21 Feb 2014 17:24:04 +0100
|
||||
Subject: [PATCH] crypto: Reduce preempt disabled regions, more algos
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Don Estabrook reported
|
||||
| kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: debugobjects-rt.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 17 Jul 2011 21:41:35 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: dm: Make rt aware
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Mon, 14 Nov 2011 23:06:09 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Use the BUG_ON_NORT variant for the irq_disabled() checks. RT has
|
||||
interrupts legitimately enabled here as we cant deadlock against the
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Ingo Molnar <mingo@elte.hu>
|
||||
Date: Fri, 3 Jul 2009 08:29:24 -0500
|
||||
Subject: drivers/net: Use disable_irq_nosync() in 8139too
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Use disable_irq_nosync() instead of disable_irq() as this might be
|
||||
called in atomic context with netpoll.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sat, 20 Jun 2009 11:36:54 +0200
|
||||
Subject: drivers/net: fix livelock issues
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Preempt-RT runs into a live lock issue with the NETDEV_TX_LOCKED micro
|
||||
optimization. The reason is that the softirq thread is rescheduling
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Date: Fri, 3 Jul 2009 08:30:00 -0500
|
||||
Subject: drivers/net: vortex fix locking issues
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Argh, cut and paste wasn't enough...
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Ingo Molnar <mingo@elte.hu>
|
||||
Date: Fri, 3 Jul 2009 08:29:30 -0500
|
||||
Subject: drivers: random: Reduce preempt disabled region
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
No need to keep preemption disabled across the whole function.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: drivers-tty-fix-omap-lock-crap.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Thu, 28 Jul 2011 13:32:57 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: drivers-tty-pl011-irq-disable-madness.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Tue, 08 Jan 2013 21:36:51 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -2,7 +2,7 @@ From d841118ac80c5bfb18f47984bc40687eed08b714 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 25 Apr 2013 18:12:52 +0200
|
||||
Subject: [PATCH] drm/i915: drop trace_i915_gem_ring_dispatch on rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
This tracepoint is responsible for:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: early-printk-consolidate.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sat, 23 Jul 2011 11:04:08 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: epoll.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 08 Jul 2011 16:35:35 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Subject: x86: Do not disable preemption in int3 on 32bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Preemption must be disabled before enabling interrupts in do_trap
|
||||
on x86_64 because the stack in use for int3 and debug is a per CPU
|
||||
|
|
|
@ -2,7 +2,7 @@ From 53a9508f5983092928b0e6e12f400b686e1f04b1 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 28 Oct 2013 11:50:06 +0100
|
||||
Subject: [PATCH] a few open coded completions
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -2,7 +2,7 @@ From dff0dd4ff87b8f41b438f8b9bb32d2343943bb32 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 16 Feb 2015 18:49:10 +0100
|
||||
Subject: [PATCH] fs/aio: simple simple work
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:768
|
||||
|in_atomic(): 1, irqs_disabled(): 0, pid: 26, name: rcuos/2
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: fs-block-rt-support.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Tue, 14 Jun 2011 17:05:09 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: fs: dcache: Use cpu_chill() in trylock loops
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 07 Mar 2012 21:00:34 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Retry loops on RT might loop forever when the modifying side was
|
||||
preempted. Use cpu_chill() instead of cpu_relax() to let the system
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Mike Galbraith <mgalbraith@suse.de>
|
||||
Date: Wed, 11 Jul 2012 22:05:20 +0000
|
||||
Subject: fs, jbd: pull your plug when waiting for space
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
With an -rt kernel, and a heavy sync IO load, tasks can jam
|
||||
up on journal locks without unplugging, which can lead to
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 18 Mar 2011 10:11:25 +0100
|
||||
Subject: fs: jbd/jbd2: Make state lock and journal head lock rt safe
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
bit_spin_locks break under RT.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From c28e07715162bb1e1567a935b45772ca85a5267c Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 17 Feb 2014 17:30:03 +0100
|
||||
Subject: [PATCH] fs: jbd2: pull your plug when waiting for space
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Two cps in parallel managed to stall the the ext4 fs. It seems that
|
||||
journal code is either waiting for locks or sleeping waiting for
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 19 Jul 2009 08:44:27 -0500
|
||||
Subject: fs: namespace preemption fix
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
On RT we cannot loop with preemption disabled here as
|
||||
mnt_make_readonly() might have been preempted. We can safely enable
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Mike Galbraith <efault@gmx.de>
|
||||
Date: Fri, 3 Jul 2009 08:44:12 -0500
|
||||
Subject: fs: ntfs: disable interrupt only on !RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
On Sat, 2007-10-27 at 11:44 +0200, Ingo Molnar wrote:
|
||||
> * Nick Piggin <nickpiggin@yahoo.com.au> wrote:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 18 Mar 2011 09:18:52 +0100
|
||||
Subject: buffer_head: Replace bh_uptodate_lock for -rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Wrap the bit_spin_lock calls into a separate inline and add the RT
|
||||
replacements with a real spinlock.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 17 Jul 2011 21:56:42 +0200
|
||||
Subject: ftrace-migrate-disable-tracing.patch
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
225
debian/patches/features/all/rt/futex-avoid-double-wake-up-in-PI-futex-wait-wake-on-.patch
vendored
Normal file
225
debian/patches/features/all/rt/futex-avoid-double-wake-up-in-PI-futex-wait-wake-on-.patch
vendored
Normal file
|
@ -0,0 +1,225 @@
|
|||
From 460bffd867ab18d151650bf9cb83207e56cc0947 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 18 Feb 2015 20:17:31 +0100
|
||||
Subject: [PATCH] futex: avoid double wake up in PI futex wait / wake on -RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
The boosted priority is reverted after the unlock but before the
|
||||
futex_hash_bucket (hb) has been accessed. The result is that we boost the
|
||||
task, deboost the task, boost again for the hb lock, deboost again.
|
||||
A sched trace of this scenario looks the following:
|
||||
|
||||
| med_prio-93 sched_wakeup: comm=high_prio pid=92 prio=9 success=1 target_cpu=000
|
||||
| med_prio-93 sched_switch: prev_comm=med_prio prev_pid=93 prev_prio=29 prev_state=R ==> next_comm=high_prio next_pid=92 next_prio=9
|
||||
|high_prio-92 sched_pi_setprio: comm=low_prio pid=91 oldprio=120 newprio=9
|
||||
|high_prio-92 sched_switch: prev_comm=high_prio prev_pid=92 prev_prio=9 prev_state=S ==> next_comm=low_prio next_pid=91 next_prio=9
|
||||
| low_prio-91 sched_wakeup: comm=high_prio pid=92 prio=9 success=1 target_cpu=000
|
||||
| low_prio-91 sched_pi_setprio: comm=low_prio pid=91 oldprio=9 newprio=120
|
||||
| low_prio-91 sched_switch: prev_comm=low_prio prev_pid=91 prev_prio=120 prev_state=R+ ==> next_comm=high_prio next_pid=92 next_prio=9
|
||||
|high_prio-92 sched_pi_setprio: comm=low_prio pid=91 oldprio=120 newprio=9
|
||||
|high_prio-92 sched_switch: prev_comm=high_prio prev_pid=92 prev_prio=9 prev_state=D ==> next_comm=low_prio next_pid=91 next_prio=9
|
||||
| low_prio-91 sched_wakeup: comm=high_prio pid=92 prio=9 success=1 target_cpu=000
|
||||
| low_prio-91 sched_pi_setprio: comm=low_prio pid=91 oldprio=9 newprio=120
|
||||
| low_prio-91 sched_switch: prev_comm=low_prio prev_pid=91 prev_prio=120 prev_state=R+ ==> next_comm=high_prio next_pid=92 next_prio=9
|
||||
|
||||
We see four sched_pi_setprio() invocation but ideally two would be enough.
|
||||
The patch tries to avoid the double wakeup by a wake up once the hb lock is
|
||||
released. The same test case:
|
||||
|
||||
| med_prio-21 sched_wakeup: comm=high_prio pid=20 prio=9 success=1 target_cpu=000
|
||||
| med_prio-21 sched_switch: prev_comm=med_prio prev_pid=21 prev_prio=29 prev_state=R ==> next_comm=high_prio next_pid=20 next_prio=9
|
||||
|high_prio-20 sched_pi_setprio: comm=low_prio pid=19 oldprio=120 newprio=9
|
||||
|high_prio-20 sched_switch: prev_comm=high_prio prev_pid=20 prev_prio=9 prev_state=S ==> next_comm=low_prio next_pid=19 next_prio=9
|
||||
| low_prio-19 sched_wakeup: comm=high_prio pid=20 prio=9 success=1 target_cpu=000
|
||||
| low_prio-19 sched_pi_setprio: comm=low_prio pid=19 oldprio=9 newprio=120
|
||||
| low_prio-19 sched_switch: prev_comm=low_prio prev_pid=19 prev_prio=120 prev_state=R+ ==> next_comm=high_prio next_pid=20 next_prio=9
|
||||
|
||||
only two sched_pi_setprio() invocations as one would expect and see
|
||||
without -RT.
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
kernel/futex.c | 32 +++++++++++++++++++++++++++++---
|
||||
kernel/locking/rtmutex.c | 40 +++++++++++++++++++++++++++++-----------
|
||||
kernel/locking/rtmutex_common.h | 4 ++++
|
||||
3 files changed, 62 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/kernel/futex.c
|
||||
+++ b/kernel/futex.c
|
||||
@@ -1117,11 +1117,13 @@ static void mark_wake_futex(struct wake_
|
||||
q->lock_ptr = NULL;
|
||||
}
|
||||
|
||||
-static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this)
|
||||
+static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this,
|
||||
+ struct futex_hash_bucket *hb)
|
||||
{
|
||||
struct task_struct *new_owner;
|
||||
struct futex_pi_state *pi_state = this->pi_state;
|
||||
u32 uninitialized_var(curval), newval;
|
||||
+ bool deboost;
|
||||
int ret = 0;
|
||||
|
||||
if (!pi_state)
|
||||
@@ -1173,7 +1175,17 @@ static int wake_futex_pi(u32 __user *uad
|
||||
raw_spin_unlock_irq(&new_owner->pi_lock);
|
||||
|
||||
raw_spin_unlock(&pi_state->pi_mutex.wait_lock);
|
||||
- rt_mutex_unlock(&pi_state->pi_mutex);
|
||||
+
|
||||
+ deboost = rt_mutex_futex_unlock(&pi_state->pi_mutex);
|
||||
+
|
||||
+ /*
|
||||
+ * We deboost after dropping hb->lock. That prevents a double
|
||||
+ * wakeup on RT.
|
||||
+ */
|
||||
+ spin_unlock(&hb->lock);
|
||||
+
|
||||
+ if (deboost)
|
||||
+ rt_mutex_adjust_prio(current);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2413,13 +2425,26 @@ static int futex_unlock_pi(u32 __user *u
|
||||
*/
|
||||
match = futex_top_waiter(hb, &key);
|
||||
if (match) {
|
||||
- ret = wake_futex_pi(uaddr, uval, match);
|
||||
+ ret = wake_futex_pi(uaddr, uval, match, hb);
|
||||
+
|
||||
+ /*
|
||||
+ * In case of success wake_futex_pi dropped the hash
|
||||
+ * bucket lock.
|
||||
+ */
|
||||
+ if (!ret)
|
||||
+ goto out_putkey;
|
||||
+
|
||||
/*
|
||||
* The atomic access to the futex value generated a
|
||||
* pagefault, so retry the user-access and the wakeup:
|
||||
*/
|
||||
if (ret == -EFAULT)
|
||||
goto pi_faulted;
|
||||
+
|
||||
+ /*
|
||||
+ * wake_futex_pi has detected invalid state. Tell user
|
||||
+ * space.
|
||||
+ */
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
@@ -2440,6 +2465,7 @@ static int futex_unlock_pi(u32 __user *u
|
||||
|
||||
out_unlock:
|
||||
spin_unlock(&hb->lock);
|
||||
+out_putkey:
|
||||
put_futex_key(&key);
|
||||
return ret;
|
||||
|
||||
--- a/kernel/locking/rtmutex.c
|
||||
+++ b/kernel/locking/rtmutex.c
|
||||
@@ -300,7 +300,7 @@ static void __rt_mutex_adjust_prio(struc
|
||||
* of task. We do not use the spin_xx_mutex() variants here as we are
|
||||
* outside of the debug path.)
|
||||
*/
|
||||
-static void rt_mutex_adjust_prio(struct task_struct *task)
|
||||
+void rt_mutex_adjust_prio(struct task_struct *task)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -957,8 +957,9 @@ static int task_blocks_on_rt_mutex(struc
|
||||
/*
|
||||
* Wake up the next waiter on the lock.
|
||||
*
|
||||
- * Remove the top waiter from the current tasks pi waiter list and
|
||||
- * wake it up.
|
||||
+ * Remove the top waiter from the current tasks pi waiter list,
|
||||
+ * wake it up and return whether the current task needs to undo
|
||||
+ * a potential priority boosting.
|
||||
*
|
||||
* Called with lock->wait_lock held.
|
||||
*/
|
||||
@@ -1255,7 +1256,7 @@ static inline int rt_mutex_slowtrylock(s
|
||||
/*
|
||||
* Slow path to release a rt-mutex:
|
||||
*/
|
||||
-static void __sched
|
||||
+static bool __sched
|
||||
rt_mutex_slowunlock(struct rt_mutex *lock)
|
||||
{
|
||||
raw_spin_lock(&lock->wait_lock);
|
||||
@@ -1298,7 +1299,7 @@ rt_mutex_slowunlock(struct rt_mutex *loc
|
||||
while (!rt_mutex_has_waiters(lock)) {
|
||||
/* Drops lock->wait_lock ! */
|
||||
if (unlock_rt_mutex_safe(lock) == true)
|
||||
- return;
|
||||
+ return false;
|
||||
/* Relock the rtmutex and try again */
|
||||
raw_spin_lock(&lock->wait_lock);
|
||||
}
|
||||
@@ -1311,8 +1312,7 @@ rt_mutex_slowunlock(struct rt_mutex *loc
|
||||
|
||||
raw_spin_unlock(&lock->wait_lock);
|
||||
|
||||
- /* Undo pi boosting if necessary: */
|
||||
- rt_mutex_adjust_prio(current);
|
||||
+ return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1363,12 +1363,14 @@ rt_mutex_fasttrylock(struct rt_mutex *lo
|
||||
|
||||
static inline void
|
||||
rt_mutex_fastunlock(struct rt_mutex *lock,
|
||||
- void (*slowfn)(struct rt_mutex *lock))
|
||||
+ bool (*slowfn)(struct rt_mutex *lock))
|
||||
{
|
||||
- if (likely(rt_mutex_cmpxchg(lock, current, NULL)))
|
||||
+ if (likely(rt_mutex_cmpxchg(lock, current, NULL))) {
|
||||
rt_mutex_deadlock_account_unlock(current);
|
||||
- else
|
||||
- slowfn(lock);
|
||||
+ } else if (slowfn(lock)) {
|
||||
+ /* Undo pi boosting if necessary: */
|
||||
+ rt_mutex_adjust_prio(current);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1463,6 +1465,22 @@ void __sched rt_mutex_unlock(struct rt_m
|
||||
EXPORT_SYMBOL_GPL(rt_mutex_unlock);
|
||||
|
||||
/**
|
||||
+ * rt_mutex_futex_unlock - Futex variant of rt_mutex_unlock
|
||||
+ * @lock: the rt_mutex to be unlocked
|
||||
+ *
|
||||
+ * Returns: true/false indicating whether priority adjustment is
|
||||
+ * required or not.
|
||||
+ */
|
||||
+bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock)
|
||||
+{
|
||||
+ if (likely(rt_mutex_cmpxchg(lock, current, NULL))) {
|
||||
+ rt_mutex_deadlock_account_unlock(current);
|
||||
+ return false;
|
||||
+ }
|
||||
+ return rt_mutex_slowunlock(lock);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* rt_mutex_destroy - mark a mutex unusable
|
||||
* @lock: the mutex to be destroyed
|
||||
*
|
||||
--- a/kernel/locking/rtmutex_common.h
|
||||
+++ b/kernel/locking/rtmutex_common.h
|
||||
@@ -132,6 +132,10 @@ extern int rt_mutex_finish_proxy_lock(st
|
||||
struct rt_mutex_waiter *waiter);
|
||||
extern int rt_mutex_timed_futex_lock(struct rt_mutex *l, struct hrtimer_sleeper *to);
|
||||
|
||||
+extern bool rt_mutex_futex_unlock(struct rt_mutex *lock);
|
||||
+
|
||||
+extern void rt_mutex_adjust_prio(struct task_struct *task);
|
||||
+
|
||||
#ifdef CONFIG_DEBUG_RT_MUTEXES
|
||||
# include "rtmutex-debug.h"
|
||||
#else
|
|
@ -1,6 +1,6 @@
|
|||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Subject: futex: Fix bug on when a requeued RT task times out
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Requeue with timeout causes a bug with PREEMPT_RT_FULL.
|
||||
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
}
|
||||
|
||||
/*
|
||||
@@ -1584,6 +1585,35 @@ int rt_mutex_start_proxy_lock(struct rt_
|
||||
@@ -1602,6 +1603,35 @@ int rt_mutex_start_proxy_lock(struct rt_
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Ingo Molnar <mingo@elte.hu>
|
||||
Date: Fri, 3 Jul 2009 08:29:57 -0500
|
||||
Subject: genirq: disable irqpoll on -rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Creates long latencies for no value
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ From 76666dbbdd40e963e7df84c123fc9aea4a2bcc69 Mon Sep 17 00:00:00 2001
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 21 Aug 2013 17:48:46 +0200
|
||||
Subject: [PATCH] genirq: do not invoke the affinity callback via a workqueue
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Joe Korty reported, that __irq_set_affinity_locked() schedules a
|
||||
workqueue while holding a rawlock which results in a might_sleep()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: genirq-force-threading.patch
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 03 Apr 2011 11:57:29 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue