diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-08-29 16:03:48 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-08-29 16:03:48 -0400 |
commit | 8e2e682c8c8569faa0d5241198775a7330597653 (patch) | |
tree | 96059f6365c5d46fbcddd3003a2f1e4087724ce1 | |
parent | 1f31637c031a15b2534ae46d21d3d6a1fbf9a1eb (diff) | |
download | 4.8-rt-patches-8e2e682c8c8569faa0d5241198775a7330597653.tar.gz |
mmdrop: refreshrt-v4.6-8666-g5469dc270cd4
-rw-r--r-- | patches/sched-Move-mmdrop-to-RCU-on-RT.patch | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/patches/sched-Move-mmdrop-to-RCU-on-RT.patch b/patches/sched-Move-mmdrop-to-RCU-on-RT.patch index 43e69faa531a5..d162909ab322f 100644 --- a/patches/sched-Move-mmdrop-to-RCU-on-RT.patch +++ b/patches/sched-Move-mmdrop-to-RCU-on-RT.patch @@ -1,4 +1,4 @@ -From ac89152511a4392c18f0c2a240667787a0a85128 Mon Sep 17 00:00:00 2001 +From e451b0c9724c3aed378b619b3d1f1a47ffbaae6b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 6 Jun 2011 12:20:33 +0200 Subject: [PATCH] sched: Move mmdrop to RCU on RT @@ -9,7 +9,7 @@ we want to do in task switch and oder atomic contexts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index c2d75b4fa86c..8349504e0bbe 100644 +index d553855503e6..45f59c2398e3 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -11,6 +11,7 @@ @@ -18,9 +18,9 @@ index c2d75b4fa86c..8349504e0bbe 100644 #include <linux/uprobes.h> +#include <linux/rcupdate.h> #include <linux/page-flags-layout.h> + #include <linux/workqueue.h> #include <asm/page.h> - #include <asm/mmu.h> -@@ -502,6 +503,9 @@ struct mm_struct { +@@ -507,6 +508,9 @@ struct mm_struct { bool tlb_flush_pending; #endif struct uprobes_state uprobes_state; @@ -31,18 +31,19 @@ index c2d75b4fa86c..8349504e0bbe 100644 /* address of the bounds directory */ void __user *bd_addr; diff --git a/include/linux/sched.h b/include/linux/sched.h -index 6f12ecb0a7af..c445dda561a1 100644 +index 0f496c2da1b9..b53efc525e61 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2746,12 +2746,24 @@ extern struct mm_struct * mm_alloc(void); +@@ -2752,6 +2752,7 @@ extern struct mm_struct * mm_alloc(void); /* mmdrop drops the mm and the page tables */ extern void __mmdrop(struct mm_struct *); + - static inline void mmdrop(struct mm_struct * mm) + static inline void mmdrop(struct mm_struct *mm) { if (unlikely(atomic_dec_and_test(&mm->mm_count))) - __mmdrop(mm); +@@ -2763,6 +2764,17 @@ static inline bool mmget_not_zero(struct mm_struct *mm) + return atomic_inc_not_zero(&mm->mm_users); } +#ifdef CONFIG_PREEMPT_RT_BASE @@ -58,14 +59,14 @@ index 6f12ecb0a7af..c445dda561a1 100644 + /* mmput gets rid of the mappings and all user-space */ extern void mmput(struct mm_struct *); - /* Grab a reference to a task's mm, if it is not already going away */ + /* same as above but performs the slow path from the async kontext. Can diff --git a/kernel/fork.c b/kernel/fork.c -index 5f92cf9e817b..ef4442514162 100644 +index 04b34ce10164..7c4a21f54acd 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -712,6 +712,19 @@ void __mmdrop(struct mm_struct *mm) +@@ -696,6 +696,19 @@ struct mm_struct *mm_alloc(void) + return mm_init(mm, current); } - EXPORT_SYMBOL_GPL(__mmdrop); +#ifdef CONFIG_PREEMPT_RT_BASE +/* @@ -81,8 +82,8 @@ index 5f92cf9e817b..ef4442514162 100644 +#endif + /* - * Decrement the use count and release all resources for an mm. - */ + * Called when the last reference to the mm + * is dropped: either by a lazy thread or by diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 55e398b5fdd9..07d582b038a3 100644 --- a/kernel/sched/core.c |