Archive-only list for patches
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev via B4 Web Endpoint <devnull@kernel.org>
To: patches@lists.linux.dev
Subject: [PATCH v1 7/9] mm/compaction: Get rid of RT ifdeffery
Date: Fri, 19 Aug 2022 14:17:21 -0400	[thread overview]
Message-ID: <20220819-test-endpoint-send-v1-7-2d7c68bdbbdc@linuxfoundation.org> (raw)
In-Reply-To: <20220819-test-endpoint-send-v1-0-2d7c68bdbbdc@linuxfoundation.org>

From: Thomas Gleixner <tglx@linutronix.de>

Move the RT dependency for the initial value of
sysctl_compact_unevictable_allowed into Kconfig.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Terrell <terrelln@fb.com>
Cc: linux-mm@kvack.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>

diff --git a/mm/Kconfig b/mm/Kconfig
index 0331f1461f81..a0506a54a4f3 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@kvack.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 640fa76228dd..10561cb1aaad 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)

-- 
b4 0.10.0-dev-c53d8


  parent reply	other threads:[~2022-08-19 18:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 18:17 [PATCH v1 0/9] This is a fake series to test web-endpoint-send Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` [PATCH v1 1/9] slub: Make PREEMPT_RT support less convoluted Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` [PATCH v1 2/9] preempt: Provide preempt_[dis|en]able_nested() Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` [PATCH v1 3/9] dentry: Use preempt_[dis|en]able_nested() Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` [PATCH v1 4/9] mm/vmstat: " Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` [PATCH v1 5/9] mm/debug: Provide VM_WARN_ON_IRQS_ENABLED() Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` [PATCH v1 6/9] mm/memcontrol: Replace the PREEMPT_RT conditionals Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` Konstantin Ryabitsev via B4 Web Endpoint [this message]
2022-08-19 18:17 ` [PATCH v1 8/9] u64_stats: Streamline the implementation Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:17 ` [PATCH v1 9/9] u64_stat: Remove the obsolete fetch_irq() variants Konstantin Ryabitsev via B4 Web Endpoint
2022-08-19 18:33 ` [PATCH v1 0/9] This is a fake series to test web-endpoint-send konstantin.ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220819-test-endpoint-send-v1-7-2d7c68bdbbdc@linuxfoundation.org \
    --to=devnull@kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=patches@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox