Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752547AbdIAQnm (ORCPT ); Fri, 1 Sep 2017 12:43:42 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38837 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbdIAQmJ (ORCPT ); Fri, 1 Sep 2017 12:42:09 -0400 X-Google-Smtp-Source: ADKCNb6sKlSFmDHDyirrbXsR2uZ6ZdXDH5Zf04T2g1bI6ZR/WQXd/pB4vap1Qt24Z8b6jMB51Txb+A== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Peter Zijlstra , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Ingo Molnar , Mike Galbraith , Rik van Riel , Wanpeng Li Subject: [PATCH 07/12] housekeeping: Move it under own config, independant from NO_HZ Date: Fri, 1 Sep 2017 18:41:42 +0200 Message-Id: <1504284108-6157-8-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504284108-6157-1-git-send-email-fweisbec@gmail.com> References: <1504284108-6157-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2671 Lines: 81 Complete the housekeeping split from CONFIG_NO_HZ_FULL by moving it under its own config. This way we finally separate the isolation code from nohz. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Rik van Riel Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Mike Galbraith Cc: Ingo Molnar Cc: Christoph Lameter Cc: Paul E. McKenney Cc: Wanpeng Li Cc: Luiz Capitulino --- include/linux/housekeeping.h | 6 +++--- init/Kconfig | 7 +++++++ kernel/Makefile | 2 +- 3 files changed, 11 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 8514b25..f35bdae 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -472,6 +472,13 @@ config TASK_IO_ACCOUNTING endmenu # "CPU/Task time and stats accounting" +config CPU_ISOLATION + bool "CPU isolation" + 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 8a85c4b..445f876 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -109,7 +109,7 @@ obj-$(CONFIG_JUMP_LABEL) += jump_label.o obj-$(CONFIG_CONTEXT_TRACKING) += context_tracking.o obj-$(CONFIG_TORTURE_TEST) += torture.o obj-$(CONFIG_MEMBARRIER) += membarrier.o -obj-$(CONFIG_NO_HZ_FULL) += housekeeping.o +obj-$(CONFIG_CPU_ISOLATION) += housekeeping.o obj-$(CONFIG_HAS_IOMEM) += memremap.o -- 2.7.4