public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Waiman Long <longman@redhat.com>
Cc: Gianfranco Dutka <gianfranco.dutka@arista.com>,
	Tejun Heo <tj@kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-kernel@vger.kernel.org, vincent.guittot@linaro.com,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	"Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>,
	Phil Auld <pauld@redhat.com>, Cestmir Kalina <ckalina@redhat.com>
Subject: Re: Modifying isolcpus, nohz_full, and rcu_nocb kernel parameters at runtime
Date: Wed, 13 Dec 2023 00:57:08 +0100	[thread overview]
Message-ID: <ZXjzVKAM7Xt3eeAQ@lothringen> (raw)
In-Reply-To: <7e3bf653-d3ea-48b0-b808-d92a3c5f2c5b@redhat.com>

On Tue, Dec 12, 2023 at 03:18:43PM -0500, Waiman Long wrote:
> 
> On 12/12/23 08:27, Frederic Weisbecker wrote:
> > On Fri, Dec 08, 2023 at 09:18:53AM -0500, Gianfranco Dutka wrote:
> > > > The isolcpus, nohz_full and rcu_nocbs are boot-time kernel parameters. I am in the process of improving dynamic CPU isolation at runtime. Right now, we are able to do isolcpus=domain with the isolated cpuset partition functionality. Other aspects of CPU isolation are being looked at with the goal of reducing the gap of what one can do at boot time versus what can be done at run time. It will certain take time to reach that goal.
> > > > 
> > > > Cheers,
> > > > Longman
> > > > 
> > > Thank you Waiman for the response. It would seem that getting similar
> > > functionality through cgroups/cpusets is the only option at the moment. Is it
> > > completely out of the question to possibly patch the kernel to modify these
> > > parameters at runtime? Or would that entail a significant change that might
> > > not be so trivial to accomplish? For instance, the solution wouldn’t be as
> > > simple as patching the kernel to make these writeable and then calling the
> > > same functions which run at boot-time when these parameters are originally
> > > written?
> > As for nohz_full (which implies rcu_nocb), it's certainly possible to make it
> > tunable at runtime via cpusets. If people really want it, I'm willing to help.
> 
> As said by Phil, your help in in enabling dynamic rcu_nocb will be greatly
> appreciated.

rcu_nocb is already ready for that. The not yet ready part is nohz_full and its
several components (tick, remote tick, [hr-]timers affinity, workqueues affinity, kthreads
affinity, vmstat, buffer head, etc...). Last debate on plumbers suggested that
nohz_full should be dynamically turned on/off only on offline CPUs. That will
indeed simplify the problem.

> My current thought is to have a root level
> cpuset.cpus.isolation_control file to enable additional CPU isolation like
> rcu_nocb to be applied to CPUs in isolated partitions.

Last time I tried that, Peter Zijlstra was more in favour of an isolate all or nothing
switch by default for nohz_full that would include rcu_nocb. And then if people
are interested in something more finegrained, introduce such a file to control
individual features (see
https://lore.kernel.org/lkml/YpIwsiaY2IPK96WO@hirez.programming.kicks-ass.net/ )

But so far I never heard about the need for such a finegrained isolation. Users of
nohz_full= seem to want to isolate everything out.

Thanks.

  reply	other threads:[~2023-12-12 23:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 15:07 Modifying isolcpus, nohz_full, and rcu_nocb kernel parameters at runtime Gianfranco Dutka
2023-12-07 16:32 ` Vincent Guittot
2023-12-07 22:41   ` Tejun Heo
     [not found]     ` <d46834f4-a490-4a4a-9e95-cca4a6316570@redhat.com>
2023-12-08 14:21       ` Gianfranco Dutka
     [not found]       ` <25E6E1E4-DC16-490E-B907-A3236FB9317A@arista.com>
2023-12-08 15:39         ` Waiman Long
2023-12-12 13:27         ` Frederic Weisbecker
2023-12-12 14:04           ` Pandruvada, Srinivas
2023-12-12 20:13             ` Waiman Long
2023-12-12 18:48           ` Phil Auld
2023-12-12 20:18           ` Waiman Long
2023-12-12 23:57             ` Frederic Weisbecker [this message]
2023-12-13  2:28               ` Waiman Long

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=ZXjzVKAM7Xt3eeAQ@lothringen \
    --to=frederic@kernel.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=ckalina@redhat.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=gianfranco.dutka@arista.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=pauld@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=srinivas.pandruvada@intel.com \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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