summarylogtreecommitdiffstats
path: root/0027-ZEN-INTERACTIVE-mm-Disable-unevictable-compaction.patch
blob: 7a7663ecec91cb3f34fb967a8bcc3c261ee872a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Steven Barrett <steven@liquorix.net>
Date: Sat, 5 Mar 2022 11:37:14 -0600
Subject: [PATCH] ZEN: INTERACTIVE: mm: Disable unevictable compaction

This option is already disabled when CONFIG_PREEMPT_RT is enabled, lets
turn it off when CONFIG_ZEN_INTERACTIVE is set as well.
---
 init/Kconfig    | 1 +
 mm/compaction.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index 96e6511aa009543b871bd28bd9246cd68411286e..b7c7bdbd96c6d417f7ed5f8aee558044a121e351 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -125,6 +125,7 @@ config ZEN_INTERACTIVE
 
 	    Background-reclaim hugepages...:   no   ->   yes
 	    MG-LRU minimum cache TTL.......:   0    ->   1000 ms
+	    Compact Unevictable............:   1    ->   0
 
 	  --- CFS CPU Scheduler ----------------------------------
 
diff --git a/mm/compaction.c b/mm/compaction.c
index fe915db6149b9c4c74a775b1d018b09b8d0fd68d..877b029a87e76aaad1c36669395dd3f359e14f03 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1736,7 +1736,7 @@ typedef enum {
  * Allow userspace to control policy on scanning the unevictable LRU for
  * compactable pages.
  */
-#ifdef CONFIG_PREEMPT_RT
+#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_ZEN_INTERACTIVE)
 int sysctl_compact_unevictable_allowed __read_mostly = 0;
 #else
 int sysctl_compact_unevictable_allowed __read_mostly = 1;