summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch')
-rw-r--r--debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch b/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch
new file mode 100644
index 000000000..51f7bfdf1
--- /dev/null
+++ b/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch
@@ -0,0 +1,42 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Mon, 12 Aug 2019 11:20:44 +0200
+Subject: [PATCH] mm/swap: Enable use pvec lock on RT
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz
+
+On RT we also need to avoid preempt disable/IRQ-off regions so have to enable
+the locking while accessing pvecs.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ mm/internal.h | 4 ++++
+ mm/swap.c | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+--- a/mm/internal.h
++++ b/mm/internal.h
+@@ -32,7 +32,11 @@
+ /* Do not use these with a slab allocator */
+ #define GFP_SLAB_BUG_MASK (__GFP_DMA32|__GFP_HIGHMEM|~__GFP_BITS_MASK)
+
++#ifdef CONFIG_PREEMPT_RT
++extern struct static_key_true use_pvec_lock;
++#else
+ extern struct static_key_false use_pvec_lock;
++#endif
+
+ void page_writeback_init(void);
+
+--- a/mm/swap.c
++++ b/mm/swap.c
+@@ -44,7 +44,11 @@
+ /* How many pages do we try to swap or page in/out together? */
+ int page_cluster;
+
++#ifdef CONFIG_PREEMPT_RT
++DEFINE_STATIC_KEY_TRUE(use_pvec_lock);
++#else
+ DEFINE_STATIC_KEY_FALSE(use_pvec_lock);
++#endif
+
+ struct swap_pagevec {
+ spinlock_t lock;