[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220817162703.728679-8-bigeasy@linutronix.de>
Date: Wed, 17 Aug 2022 18:27:01 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Nick Terrell <terrelln@...com>, linux-mm@...ck.org,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH 7/9] mm/compaction: Get rid of RT ifdeffery
From: Thomas Gleixner <tglx@...utronix.de>
Move the RT dependency for the initial value of
sysctl_compact_unevictable_allowed into Kconfig.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Nick Terrell <terrelln@...com>
Cc: linux-mm@...ck.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
mm/Kconfig | 5 +++++
mm/compaction.c | 6 +-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index 0331f1461f81c..a0506a54a4f3f 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -579,6 +579,11 @@ config COMPACTION
it and then we would be really interested to hear about that at
linux-mm@...ck.org.
+config COMPACT_UNEVICTABLE_DEFAULT
+ int
+ default 0 if PREEMPT_RT
+ default 1
+
#
# support for free page reporting
config PAGE_REPORTING
diff --git a/mm/compaction.c b/mm/compaction.c
index 640fa76228dd9..10561cb1aaad9 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1727,11 +1727,7 @@ typedef enum {
* Allow userspace to control policy on scanning the unevictable LRU for
* compactable pages.
*/
-#ifdef CONFIG_PREEMPT_RT
-int sysctl_compact_unevictable_allowed __read_mostly = 0;
-#else
-int sysctl_compact_unevictable_allowed __read_mostly = 1;
-#endif
+int sysctl_compact_unevictable_allowed __read_mostly = CONFIG_COMPACT_UNEVICTABLE_DEFAULT;
static inline void
update_fast_start_pfn(struct compact_control *cc, unsigned long pfn)
--
2.37.2
Powered by blists - more mailing lists