From patchwork Thu Aug 25 16:41:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12955073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16427ECAA24 for ; Thu, 25 Aug 2022 16:41:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 63A7794000C; Thu, 25 Aug 2022 12:41:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E89A940007; Thu, 25 Aug 2022 12:41:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4898F94000C; Thu, 25 Aug 2022 12:41:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 368E5940007 for ; Thu, 25 Aug 2022 12:41:44 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 055B9A1D15 for ; Thu, 25 Aug 2022 16:41:44 +0000 (UTC) X-FDA: 79838681328.06.DFBF128 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf13.hostedemail.com (Postfix) with ESMTP id 8F3372000C for ; Thu, 25 Aug 2022 16:41:43 +0000 (UTC) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1661445702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vNtMvikVP3A7JqyI64O+1a12M8t0vOpcITdU5U0TGnE=; b=1tbpx1sbmfdpwCzS9EIDtkWSVCGguf5I2hLDQGB3gqxy3NXTtgqxr/OyUHEVyLoWq3g+P+ uLfKJpOAWO7ON0OCmzt/gOS53iP8p88HEzAMeM0nfm02bLRVp3g1wSqC6DGK639HTZVca/ JgYApAw08cAzR11s+MES0bwsTZ0DDw6Tms9QX2ubEloCEvIkqQzXebuMe6ZSiYIsWJTwrK BoWu325TadyR5PkTVpwGarSfJURzf76C+VqcMoVVxUWCcgTKt3xE1cz/0uwZTvgUPYY7nT syGRgrGaTPLKYVFR1zfTNxCgXFsCiV0tf1g+P2nyTtUlEOHbZajGvExAn9TcFg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1661445702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vNtMvikVP3A7JqyI64O+1a12M8t0vOpcITdU5U0TGnE=; b=05zUufWP4OOvhby/9h51rilXjm5mAeXZOKAZ+CURv0RQdj2qbxL8qBxvKw0Kr/LwMwpHpa 6RN8dg8XyVjM5qCg== To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Peter Zijlstra , Steven Rostedt , Linus Torvalds , Matthew Wilcox , Andrew Morton , Nick Terrell , linux-mm@kvack.org, Sebastian Andrzej Siewior Subject: [PATCH v2 6/8] mm/compaction: Get rid of RT ifdeffery Date: Thu, 25 Aug 2022 18:41:29 +0200 Message-Id: <20220825164131.402717-7-bigeasy@linutronix.de> In-Reply-To: <20220825164131.402717-1-bigeasy@linutronix.de> References: <20220825164131.402717-1-bigeasy@linutronix.de> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661445703; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vNtMvikVP3A7JqyI64O+1a12M8t0vOpcITdU5U0TGnE=; b=XYy2JcS7QfN5LQgtBHsjnb9nI5ziMvsnLCybJgPvT2eLB5sXWSFdom/fs0ioeSKrVKrMoI nTQaUzjfDmhEepts71xR9LJPJ0WLMoAG0NU6k0G52O2KZK5Exm5jcjivSmKAtn1z8ZcRAF Ef7AIp++t+RV2hoU5BGbvbk0sDrhRxc= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=1tbpx1sb; dkim=pass header.d=linutronix.de header.s=2020e header.b=05zUufWP; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf13.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661445703; a=rsa-sha256; cv=none; b=ociqdhLIOm7D5vP0Q2WBjliYyA8GfwtxrkehFxZ9RCa2d3DqZEFAA6NnMftSrtfGQq0e41 KkNd56X4ze+FjtIB3WpCJdXKjU965dp9lFXbFOC+X2BdQ+dtxTNj2vfdmK0yMhHa2YMHOQ Eutz/2TvrgLS8Umyz5N7/DsyWbsd3E0= Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=1tbpx1sb; dkim=pass header.d=linutronix.de header.s=2020e header.b=05zUufWP; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf13.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de X-Rspam-User: X-Rspamd-Queue-Id: 8F3372000C X-Rspamd-Server: rspam10 X-Stat-Signature: zob78dgs6nypieaxpx36n19htzshzz81 X-HE-Tag: 1661445703-468126 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Thomas Gleixner Move the RT dependency for the initial value of sysctl_compact_unevictable_allowed into Kconfig. Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Nick Terrell Cc: linux-mm@kvack.org Signed-off-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) --- mm/Kconfig | 6 ++++++ mm/compaction.c | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index 0331f1461f81c..3897e924e40f2 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -579,6 +579,12 @@ config COMPACTION it and then we would be really interested to hear about that at linux-mm@kvack.org. +config COMPACT_UNEVICTABLE_DEFAULT + int + depends on COMPACTION + 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)