lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-5c4991e24c69737bd41fc2737b1e3980abbf73f9@git.kernel.org>
Date:   Fri, 27 Oct 2017 05:04:17 -0700
From:   tip-bot for Frederic Weisbecker <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     lcapitulino@...hat.com, cl@...ux.com, peterz@...radead.org,
        riel@...hat.com, linux-kernel@...r.kernel.org, kernellwp@...il.com,
        mingo@...nel.org, torvalds@...ux-foundation.org,
        tglx@...utronix.de, hpa@...or.com, paulmck@...ux.vnet.ibm.com,
        efault@....de, cmetcalf@...lanox.com, frederic@...nel.org
Subject: [tip:sched/core] sched/isolation: Split out new
 CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL

Commit-ID:  5c4991e24c69737bd41fc2737b1e3980abbf73f9
Gitweb:     https://git.kernel.org/tip/5c4991e24c69737bd41fc2737b1e3980abbf73f9
Author:     Frederic Weisbecker <frederic@...nel.org>
AuthorDate: Fri, 27 Oct 2017 04:42:34 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 27 Oct 2017 09:55:28 +0200

sched/isolation: Split out new CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL

Split the 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, while the
housekeeping code still deals with NOHZ internals.

Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Chris Metcalf <cmetcalf@...lanox.com>
Cc: Christoph Lameter <cl@...ux.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Luiz Capitulino <lcapitulino@...hat.com>
Cc: Mike Galbraith <efault@....de>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...hat.com>
Cc: Wanpeng Li <kernellwp@...il.com>
Link: http://lkml.kernel.org/r/1509072159-31808-8-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 include/linux/sched/isolation.h | 6 +++---
 init/Kconfig                    | 8 ++++++++
 kernel/sched/Makefile           | 2 +-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h
index ad0f5d9..93ac2367 100644
--- a/include/linux/sched/isolation.h
+++ b/include/linux/sched/isolation.h
@@ -5,7 +5,7 @@
 #include <linux/init.h>
 #include <linux/tick.h>
 
-#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/sched/Makefile b/kernel/sched/Makefile
index 871d43d..dbe6130 100644
--- a/kernel/sched/Makefile
+++ b/kernel/sched/Makefile
@@ -26,4 +26,4 @@ obj-$(CONFIG_CGROUP_CPUACCT) += cpuacct.o
 obj-$(CONFIG_CPU_FREQ) += cpufreq.o
 obj-$(CONFIG_CPU_FREQ_GOV_SCHEDUTIL) += cpufreq_schedutil.o
 obj-$(CONFIG_MEMBARRIER) += membarrier.o
-obj-$(CONFIG_NO_HZ_FULL) += isolation.o
+obj-$(CONFIG_CPU_ISOLATION) += isolation.o

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ