linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@mellanox.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: 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>
Subject: Re: [PATCH v10 05/12] task_isolation: support CONFIG_TASK_ISOLATION_ALL
Date: Thu, 3 Mar 2016 14:40:14 -0500	[thread overview]
Message-ID: <56D8931E.4060205@mellanox.com> (raw)
In-Reply-To: <87mvqfe7h3.fsf@tassilo.jf.intel.com>

On 03/03/2016 01:34 PM, Andi Kleen wrote:
> Chris Metcalf <cmetcalf@ezchip.com> writes:
>>   
>> +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.
> That seems like a very dangerous Kconfig option.
> "CONFIG_BREAK_EVERYTHING"
> If someone sets that by default they will have a lot of trouble.
>
> I wouldn't add that, make it a run time option only.

So you were thinking, allow a special boot syntax "task_isolation=all",
which puts all the cores into task isolation mode except the boot core?

My original argument was that it was so parallel to the existing
CONFIG_NO_HZ_FULL_ALL option that it just made sense to do it,
and some testers complained about having to specify the precise
cpu range, so this seemed like an easy fix.

The commit comment for NO_HZ_FULL_ALL (f98823ac758ba) reads:

     nohz: New option to default all CPUs in full dynticks range
    
     Provide a new kernel config that defaults all CPUs to be part
     of the full dynticks range, except the boot one for timekeeping.
    
     This default setting is overriden by the nohz_full= boot option
     if passed by the user.
    
     This is helpful for those who don't need a finegrained range
     of full dynticks CPU and also for automated testing.

The same arguments would seem to apply to TASK_ISOLATION_ALL;
note that applications don't actually go into task isolation mode
without issuing the appropriate prctl(), so it shouldn't be too
dangerous if users enable it by mistake.  There will be some
extra checks at kernel entry and exit, that's all.

So on balance it still seems like a reasonable choice.  Thoughts?

-- 
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com

  reply	other threads:[~2016-03-03 19:40 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 20:09 [PATCH v10 00/12] support "task_isolation" mode Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 01/12] vmstat: add quiet_vmstat_sync function Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 02/12] vmstat: add vmstat_idle function Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 03/12] lru_add_drain_all: factor out lru_add_drain_needed Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 04/12] task_isolation: add initial support Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 05/12] task_isolation: support CONFIG_TASK_ISOLATION_ALL Chris Metcalf
2016-03-03 18:34   ` Andi Kleen
2016-03-03 19:40     ` Chris Metcalf [this message]
2016-03-03 20:04       ` Andi Kleen
2016-03-05 12:31       ` Ingo Molnar
2016-03-02 20:09 ` [PATCH v10 06/12] task_isolation: support PR_TASK_ISOLATION_STRICT mode Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 07/12] task_isolation: add debug boot flag Chris Metcalf
2016-03-02 20:37   ` Peter Zijlstra
2016-03-02 20:56     ` Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 08/12] arm, tile: turn off timer tick for oneshot_stopped state Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 09/12] arch/x86: enable task isolation functionality Chris Metcalf
2016-03-03  0:36   ` Andy Lutomirski
2016-03-03 19:52     ` Chris Metcalf
2016-03-03 23:46       ` Andy Lutomirski
2016-03-07 20:51         ` Chris Metcalf
2016-03-07 20:55           ` Andy Lutomirski
2016-03-08 20:40             ` Chris Metcalf
2016-03-09 20:58               ` Andy Lutomirski
2016-03-09 21:05                 ` Chris Metcalf
2016-03-09 21:07                   ` Andy Lutomirski
2016-03-09 21:13                     ` Chris Metcalf
2016-03-09 21:10                 ` Kees Cook
2016-03-09 21:18                   ` Andy Lutomirski
2016-03-09 21:25                     ` Kees Cook
2016-03-09 21:57                       ` Andy Lutomirski
2016-03-02 20:09 ` [PATCH v10 10/12] arch/tile: " Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 11/12] arm64: factor work_pending state machine to C Chris Metcalf
2016-03-04 16:38   ` Will Deacon
2016-03-04 20:02     ` Chris Metcalf
2016-03-14 10:29       ` Mark Rutland
2016-03-02 20:09 ` [PATCH v10 12/12] 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=56D8931E.4060205@mellanox.com \
    --to=cmetcalf@mellanox.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.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).