diff options
Diffstat (limited to 'debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch')
-rw-r--r-- | debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch b/debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch new file mode 100644 index 000000000..d30468f92 --- /dev/null +++ b/debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch @@ -0,0 +1,55 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 8 Nov 2019 12:55:47 +0100 +Subject: [PATCH] mm/compaction: Disable compact_unevictable_allowed on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz + +Since commit + 5bbe3547aa3ba ("mm: allow compaction of unevictable pages") + +it is allowed to examine mlocked pages for pages to compact by default. +On -RT even minor pagefaults are problematic because it may take a few +100us to resolve them and until then the task is blocked. + +Make compact_unevictable_allowed = 0 default and remove it from /proc on +RT. + +Link: https://lore.kernel.org/linux-mm/20190710144138.qyn4tuttdq6h7kqx@linutronix.de/ +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/sysctl.c | 3 ++- + mm/compaction.c | 4 ++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- a/kernel/sysctl.c ++++ b/kernel/sysctl.c +@@ -1488,6 +1488,7 @@ static struct ctl_table vm_table[] = { + .extra1 = &min_extfrag_threshold, + .extra2 = &max_extfrag_threshold, + }, ++#ifndef CONFIG_PREEMPT_RT + { + .procname = "compact_unevictable_allowed", + .data = &sysctl_compact_unevictable_allowed, +@@ -1497,7 +1498,7 @@ static struct ctl_table vm_table[] = { + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ONE, + }, +- ++#endif + #endif /* CONFIG_COMPACTION */ + { + .procname = "min_free_kbytes", +--- a/mm/compaction.c ++++ b/mm/compaction.c +@@ -1590,7 +1590,11 @@ typedef enum { + * Allow userspace to control policy on scanning the unevictable LRU for + * compactable pages. + */ ++#ifdef CONFIG_PREEMPT_RT ++#define sysctl_compact_unevictable_allowed 0 ++#else + int sysctl_compact_unevictable_allowed __read_mostly = 1; ++#endif + + static inline void + update_fast_start_pfn(struct compact_control *cc, unsigned long pfn) |