summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-10-08 09:44:42 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-10-08 09:44:42 -0400
commit558ad89f715e7f7af0dda692425e7db14b1167fe (patch)
treec5c882c2edd1758a8bdc8087484845f76b2a41aa
parent3292f30d2598f7ad726dbcd269dbbb0e87a54d07 (diff)
download3.10-rt-patches-558ad89f715e7f7af0dda692425e7db14b1167fe.tar.gz
patches-3.10.14-rt8.tar.xzv3.10.14-rt8
md5sum: e514cad8162a537a4235f5263e3459ca patches-3.10.14-rt8.tar.xz No announce. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--patches/localversion.patch2
-rw-r--r--patches/mm-convert-swap-to-percpu-locked.patch16
-rw-r--r--patches/move_sched_delayed_work_to_helper.patch6
-rw-r--r--patches/peterz-srcu-crypto-chain.patch4
-rw-r--r--patches/rcu-swait-Fix-RCU-conversion-of-wake_up_all-to-swait.patch34
-rw-r--r--patches/swait-Add-memory-barrier-before-checking-list-empty.patch54
-rw-r--r--patches/swait-Add-smp_mb-after-setting-h-list.patch65
7 files changed, 14 insertions, 167 deletions
diff --git a/patches/localversion.patch b/patches/localversion.patch
index 5dacefd..f2f4c46 100644
--- a/patches/localversion.patch
+++ b/patches/localversion.patch
@@ -12,4 +12,4 @@ Link: http://lkml.kernel.org/n/tip-8vdw4bfcsds27cvox6rpb334@git.kernel.org
--- /dev/null
+++ b/localversion-rt
@@ -0,0 +1 @@
-+-rt7
++-rt8
diff --git a/patches/mm-convert-swap-to-percpu-locked.patch b/patches/mm-convert-swap-to-percpu-locked.patch
index 468d74b..19a05ce 100644
--- a/patches/mm-convert-swap-to-percpu-locked.patch
+++ b/patches/mm-convert-swap-to-percpu-locked.patch
@@ -11,15 +11,15 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- a/mm/swap.c
+++ b/mm/swap.c
-@@ -31,6 +31,7 @@
- #include <linux/memcontrol.h>
+@@ -32,6 +32,7 @@
#include <linux/gfp.h>
#include <linux/uio.h>
+ #include <linux/hugetlb.h>
+#include <linux/locallock.h>
#include "internal.h"
-@@ -41,6 +42,9 @@ static DEFINE_PER_CPU(struct pagevec[NR_
+@@ -42,6 +43,9 @@ static DEFINE_PER_CPU(struct pagevec[NR_
static DEFINE_PER_CPU(struct pagevec, lru_rotate_pvecs);
static DEFINE_PER_CPU(struct pagevec, lru_deactivate_pvecs);
@@ -29,7 +29,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/*
* This path almost never happens for VM activity - pages are normally
* freed via pagevecs. But it gets used by networking.
-@@ -355,11 +359,11 @@ void rotate_reclaimable_page(struct page
+@@ -382,11 +386,11 @@ void rotate_reclaimable_page(struct page
unsigned long flags;
page_cache_get(page);
@@ -43,7 +43,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
}
-@@ -404,12 +408,13 @@ static void activate_page_drain(int cpu)
+@@ -431,12 +435,13 @@ static void activate_page_drain(int cpu)
void activate_page(struct page *page)
{
if (PageLRU(page) && !PageActive(page) && !PageUnevictable(page)) {
@@ -59,7 +59,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
}
-@@ -457,13 +462,13 @@ EXPORT_SYMBOL(mark_page_accessed);
+@@ -484,13 +489,13 @@ EXPORT_SYMBOL(mark_page_accessed);
*/
void __lru_cache_add(struct page *page, enum lru_list lru)
{
@@ -75,7 +75,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
EXPORT_SYMBOL(__lru_cache_add);
-@@ -598,9 +603,9 @@ void lru_add_drain_cpu(int cpu)
+@@ -625,9 +630,9 @@ void lru_add_drain_cpu(int cpu)
unsigned long flags;
/* No harm done if a racing interrupt already did this */
@@ -87,7 +87,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
pvec = &per_cpu(lru_deactivate_pvecs, cpu);
-@@ -628,18 +633,19 @@ void deactivate_page(struct page *page)
+@@ -655,18 +660,19 @@ void deactivate_page(struct page *page)
return;
if (likely(get_page_unless_zero(page))) {
diff --git a/patches/move_sched_delayed_work_to_helper.patch b/patches/move_sched_delayed_work_to_helper.patch
index ceb9eb8..6d63f9f 100644
--- a/patches/move_sched_delayed_work_to_helper.patch
+++ b/patches/move_sched_delayed_work_to_helper.patch
@@ -68,7 +68,7 @@ Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+ return 0;
+}
+
-+static void notify_cmos_timer(void)
++void ntp_notify_cmos_timer(void)
+{
+ do_cmos_delay = true;
+ /* Make visible before waking up process */
@@ -84,11 +84,11 @@ Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+}
+early_initcall(create_cmos_delay_thread);
+#else
- static void notify_cmos_timer(void)
+ void ntp_notify_cmos_timer(void)
{
schedule_delayed_work(&sync_cmos_work, 0);
}
+#endif /* CONFIG_PREEMPT_RT_FULL */
#else
- static inline void notify_cmos_timer(void) { }
+ void ntp_notify_cmos_timer(void) { }
diff --git a/patches/peterz-srcu-crypto-chain.patch b/patches/peterz-srcu-crypto-chain.patch
index f386104..1264976 100644
--- a/patches/peterz-srcu-crypto-chain.patch
+++ b/patches/peterz-srcu-crypto-chain.patch
@@ -146,8 +146,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+SRCU_NOTIFIER_HEAD(crypto_chain);
EXPORT_SYMBOL_GPL(crypto_chain);
- struct crypto_alg *crypto_mod_get(struct crypto_alg *alg)
-@@ -231,10 +231,10 @@ int crypto_probing_notify(unsigned long
+ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg);
+@@ -236,10 +236,10 @@ int crypto_probing_notify(unsigned long
{
int ok;
diff --git a/patches/rcu-swait-Fix-RCU-conversion-of-wake_up_all-to-swait.patch b/patches/rcu-swait-Fix-RCU-conversion-of-wake_up_all-to-swait.patch
deleted file mode 100644
index 64ea078..0000000
--- a/patches/rcu-swait-Fix-RCU-conversion-of-wake_up_all-to-swait.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1c126aeea000d5acd67b3adb153daa43fbabb600 Mon Sep 17 00:00:00 2001
-From: Steven Rostedt <rostedt@goodmis.org>
-Date: Mon, 19 Aug 2013 11:35:31 -0400
-Subject: [PATCH] rcu/swait: Fix RCU conversion of wake_up_all() to
- swait_wake()
-
-Reverting the rcu swait patches fixed the boot problem. Then when I was
-looking at the revert itself, this stood out like a sore thumb.
-
- static void rcu_nocb_gp_cleanup(struct rcu_state *rsp, struct rcu_node *rnp) {
-- swait_wake(&rnp->nocb_gp_wq[rnp->completed & 0x1]);
-+ wake_up_all(&rnp->nocb_gp_wq[rnp->completed & 0x1]);
- }
-
-See the problem there?
-
-Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- kernel/rcutree_plugin.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/kernel/rcutree_plugin.h
-+++ b/kernel/rcutree_plugin.h
-@@ -2036,7 +2036,7 @@ static int rcu_nocb_needs_gp(struct rcu_
- */
- static void rcu_nocb_gp_cleanup(struct rcu_state *rsp, struct rcu_node *rnp)
- {
-- swait_wake(&rnp->nocb_gp_wq[rnp->completed & 0x1]);
-+ swait_wake_all(&rnp->nocb_gp_wq[rnp->completed & 0x1]);
- }
-
- /*
diff --git a/patches/swait-Add-memory-barrier-before-checking-list-empty.patch b/patches/swait-Add-memory-barrier-before-checking-list-empty.patch
deleted file mode 100644
index 24ddbdd..0000000
--- a/patches/swait-Add-memory-barrier-before-checking-list-empty.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 8c7c8225cf6bfcf8a6cdcc86bc8d1137e38dde56 Mon Sep 17 00:00:00 2001
-From: Steven Rostedt <rostedt@goodmis.org>
-Date: Mon, 19 Aug 2013 11:35:32 -0400
-Subject: [PATCH] swait: Add memory barrier before checking list empty
-
-There's a race condition with swait wakeups and adding to the list. The
-__swait_wake() does a check for swait_head_has_waiters(), and if it is
-empty it will exit without doing any wake ups. The problem is that the
-check does not include any memory barriers before it makes a decision
-to wake up or not.
-
- CPU0 CPU1
- ---- ----
-
- condition = 1
-
- load h->list (is empty)
- raw_spin_lock(hlist->lock)
- hlist_add();
- __set_current_state();
- raw_spin_unlock(hlist->lock)
- swait_wake()
- swait_head_has_waiters()
- (sees h->list as empty and returns)
-
- check_condition (sees condition = 0)
-
- store condition = 1
-
- schedule()
-
-Now the task on CPU1 has just missed its wakeup. By adding a memory
-barrier before the list empty check, we fix the problem of miss seeing
-the list not empty as well as pushing out the condition for the other
-task to see.
-
-Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- kernel/wait-simple.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/kernel/wait-simple.c
-+++ b/kernel/wait-simple.c
-@@ -27,6 +27,8 @@ static inline void __swait_dequeue(struc
- /* Check whether a head has waiters enqueued */
- static inline bool swait_head_has_waiters(struct swait_head *h)
- {
-+ /* Make sure the condition is visible before checking list_empty() */
-+ smp_mb();
- return !list_empty(&h->list);
- }
-
diff --git a/patches/swait-Add-smp_mb-after-setting-h-list.patch b/patches/swait-Add-smp_mb-after-setting-h-list.patch
deleted file mode 100644
index f09ad2b..0000000
--- a/patches/swait-Add-smp_mb-after-setting-h-list.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From b82ab65560f7f21371d90f94d51b2e535574adeb Mon Sep 17 00:00:00 2001
-From: Steven Rostedt <rostedt@goodmis.org>
-Date: Mon, 19 Aug 2013 11:35:33 -0400
-Subject: [PATCH] swait: Add smp_mb() after setting h->list
-
-The raw_spin_unlock() is not a full memory barrier. It only keeps
-things from leaking past it, but does not prevent leaks from entering
-the critical section. That is:
-
- p = 1;
-
- raw_spin_lock();
- [...]
- raw_spin_unlock();
-
- y = x
-
- Can turn into:
-
- p = 1;
-
- raw_spin_lock();
-
- load x
-
- store p = 1
-
- raw_spin_unlock();
-
- y = x
-
-This means that the condition check in __swait_event() (and friends)
-can be seen before the h->list is set.
-
- raw_spin_lock();
-
- load condition;
-
- store h->list;
-
- raw_spin_unlock();
-
-And the other CPU can see h->list as empty, and this CPU see condition
-as not set, and possibly miss the wake up.
-
-To prevent this from happening, add an mb() after setting the h->list.
-
-Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- kernel/wait-simple.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/kernel/wait-simple.c
-+++ b/kernel/wait-simple.c
-@@ -16,6 +16,8 @@
- static inline void __swait_enqueue(struct swait_head *head, struct swaiter *w)
- {
- list_add(&w->node, &head->list);
-+ /* We can't let the condition leak before the setting of head */
-+ smp_mb();
- }
-
- /* Removes w from head->list. Must be called with head->lock locked. */