From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751879AbdJXO52 (ORCPT ); Tue, 24 Oct 2017 10:57:28 -0400 Received: from terminus.zytor.com ([65.50.211.136]:45487 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbdJXO5W (ORCPT ); Tue, 24 Oct 2017 10:57:22 -0400 Date: Tue, 24 Oct 2017 07:51:46 -0700 From: tip-bot for Frederic Weisbecker Message-ID: Cc: cl@linux.com, riel@redhat.com, tglx@linutronix.de, torvalds@linux-foundation.org, mingo@kernel.org, peterz@infradead.org, paulmck@linux.vnet.ibm.com, lcapitulino@redhat.com, frederic@kernel.org, linux-kernel@vger.kernel.org, efault@gmx.de, cmetcalf@mellanox.com, kernellwp@gmail.com, hpa@zytor.com Reply-To: frederic@kernel.org, kernellwp@gmail.com, linux-kernel@vger.kernel.org, cmetcalf@mellanox.com, efault@gmx.de, hpa@zytor.com, riel@redhat.com, cl@linux.com, torvalds@linux-foundation.org, tglx@linutronix.de, lcapitulino@redhat.com, mingo@kernel.org, peterz@infradead.org, paulmck@linux.vnet.ibm.com In-Reply-To: <1508850421-10058-8-git-send-email-frederic@kernel.org> References: <1508850421-10058-8-git-send-email-frederic@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] housekeeping: Move it under its own config, independent from NO_HZ Git-Commit-ID: 59e334ed3d8cbf7d1f0180690f072d0043fb9e24 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 59e334ed3d8cbf7d1f0180690f072d0043fb9e24 Gitweb: https://git.kernel.org/tip/59e334ed3d8cbf7d1f0180690f072d0043fb9e24 Author: Frederic Weisbecker AuthorDate: Tue, 24 Oct 2017 15:06:56 +0200 Committer: Ingo Molnar CommitDate: Tue, 24 Oct 2017 15:20:15 +0200 housekeeping: Move it under its own config, independent from NO_HZ Split housekeeping config from CONFIG_NO_HZ_FULL. This way we finally separate the isolation code from nohz. Although a dependency to CONFIG_NO_HZ_FULL remains for now until the housekeeping code doesn't deal anymore with nohz internals directly. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1508850421-10058-8-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar --- include/linux/housekeeping.h | 6 +++--- init/Kconfig | 8 ++++++++ kernel/Makefile | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/linux/housekeeping.h b/include/linux/housekeeping.h index 320cc2b..dcbec47 100644 --- a/include/linux/housekeeping.h +++ b/include/linux/housekeeping.h @@ -5,7 +5,7 @@ #include #include -#ifdef CONFIG_NO_HZ_FULL +#ifdef CONFIG_CPU_ISOLATION DECLARE_STATIC_KEY_FALSE(housekeeping_overriden); extern int housekeeping_any_cpu(void); extern const struct cpumask *housekeeping_cpumask(void); @@ -27,11 +27,11 @@ static inline const struct cpumask *housekeeping_cpumask(void) static inline void housekeeping_affine(struct task_struct *t) { } static inline void housekeeping_init(void) { } -#endif /* CONFIG_NO_HZ_FULL */ +#endif /* CONFIG_CPU_ISOLATION */ static inline bool housekeeping_cpu(int cpu) { -#ifdef CONFIG_NO_HZ_FULL +#ifdef CONFIG_CPU_ISOLATION if (static_branch_unlikely(&housekeeping_overriden)) return housekeeping_test_cpu(cpu); #endif diff --git a/init/Kconfig b/init/Kconfig index 78cb246..6f52e6f 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -472,6 +472,14 @@ config TASK_IO_ACCOUNTING endmenu # "CPU/Task time and stats accounting" +config CPU_ISOLATION + bool "CPU isolation" + depends on NO_HZ_FULL + help + Make sure that CPUs running critical tasks are not disturbed by + any source of "noise" such as unbound workqueues, timers, kthreads... + Unbound jobs get offloaded to housekeeping CPUs. + source "kernel/rcu/Kconfig" config BUILD_BIN2C diff --git a/kernel/Makefile b/kernel/Makefile index c63f893..5b01feb 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -109,7 +109,7 @@ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o obj-$(CONFIG_CONTEXT_TRACKING) += context_tracking.o obj-$(CONFIG_TORTURE_TEST) += torture.o -obj-$(CONFIG_NO_HZ_FULL) += housekeeping.o +obj-$(CONFIG_CPU_ISOLATION) += housekeeping.o obj-$(CONFIG_HAS_IOMEM) += memremap.o