linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@mellanox.com>
To: Gilad Ben Yossef <giladb@ezchip.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Rik van Riel" <riel@redhat.com>, Tejun Heo <tj@kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Andy Lutomirski <luto@amacapital.net>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Subject: [PATCH v11 05/13] task_isolation: support CONFIG_TASK_ISOLATION_ALL
Date: Fri, 11 Mar 2016 17:10:15 -0500	[thread overview]
Message-ID: <1457734223-26209-6-git-send-email-cmetcalf@mellanox.com> (raw)
In-Reply-To: <1457734223-26209-1-git-send-email-cmetcalf@mellanox.com>

This option, similar to NO_HZ_FULL_ALL, simplifies configuring
a system to boot by default with all cores except the boot core
running in task isolation mode.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
---
 init/Kconfig       | 10 ++++++++++
 kernel/isolation.c |  6 ++++++
 2 files changed, 16 insertions(+)

diff --git a/init/Kconfig b/init/Kconfig
index 6cab348fe454..314b09347fba 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -802,6 +802,16 @@ config TASK_ISOLATION
 	 You should say "N" unless you are intending to run a
 	 high-performance userspace driver or similar task.
 
+config TASK_ISOLATION_ALL
+	bool "Provide task isolation on all CPUs by default (except CPU 0)"
+	depends on TASK_ISOLATION
+	help
+	 If the user doesn't pass the task_isolation boot option to
+	 define the range of task isolation CPUs, consider that all
+	 CPUs in the system are task isolation by default.
+	 Note the boot CPU will still be kept outside the range to
+	 handle timekeeping duty, etc.
+
 config BUILD_BIN2C
 	bool
 	default n
diff --git a/kernel/isolation.c b/kernel/isolation.c
index c67f77d217f9..f59dcf06ba56 100644
--- a/kernel/isolation.c
+++ b/kernel/isolation.c
@@ -40,8 +40,14 @@ int __init task_isolation_init(void)
 {
 	/* For offstack cpumask, ensure we allocate an empty cpumask early. */
 	if (!saw_boot_arg) {
+#ifdef CONFIG_TASK_ISOLATION_ALL
+		alloc_cpumask_var(&task_isolation_map, GFP_KERNEL);
+		cpumask_copy(task_isolation_map, cpu_possible_mask);
+		cpumask_clear_cpu(smp_processor_id(), task_isolation_map);
+#else
 		zalloc_cpumask_var(&task_isolation_map, GFP_KERNEL);
 		return 0;
+#endif
 	}
 
 	/*
-- 
2.7.2

  parent reply	other threads:[~2016-03-11 22:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 22:10 [PATCH v11 00/13] support "task_isolation" mode Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 01/13] vmstat: add quiet_vmstat_sync function Chris Metcalf
2016-03-21 14:34   ` Michal Hocko
2016-03-21 15:44     ` Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 02/13] vmstat: add vmstat_idle function Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 03/13] lru_add_drain_all: factor out lru_add_drain_needed Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 04/13] task_isolation: add initial support Chris Metcalf
2016-03-11 22:10 ` Chris Metcalf [this message]
2016-03-11 22:10 ` [PATCH v11 06/13] task_isolation: support PR_TASK_ISOLATION_STRICT mode Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 07/13] task_isolation: add debug boot flag Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 08/13] task_isolation: add PR_TASK_ISOLATION_ONE_SHOT flag Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 09/13] arm, tile: turn off timer tick for oneshot_stopped state Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 10/13] arch/x86: enable task isolation functionality Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 11/13] arch/tile: " Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 12/13] arm64: factor work_pending state machine to C Chris Metcalf
2016-03-16 18:19   ` Chris Metcalf
2016-03-11 22:10 ` [PATCH v11 13/13] arch/arm64: enable task isolation functionality Chris Metcalf

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=1457734223-26209-6-git-send-email-cmetcalf@mellanox.com \
    --to=cmetcalf@mellanox.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux.com \
    --cc=fweisbec@gmail.com \
    --cc=giladb@ezchip.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=will.deacon@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).