mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: Zixin Wang <w1355457260@gmail.com>,
	linux-doc@vger.kernel.org, linux-rt-devel@lists.linux.dev,
	darwi@linutronix.de, john.ogness@linutronix.de,
	clrkwllms@kernel.org, rostedt@goodmis.org, corbet@lwn.net,
	wagi@monom.org, atomlin@atomlin.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] Documentation: real-time: Add runtime tuning guide
Date: Wed, 25 Nov 2026 15:52:53 +0100	[thread overview]
Message-ID: <20261125145253.iWfxNCmy@linutronix.de> (raw)
In-Reply-To: <awbgq0xQyJATel0_@localhost.localdomain>

On 2026-11-25 14:20:43 [+0100], Frederic Weisbecker wrote:
> Le Wed, Nov 25, 2026 at 07:46:58AM +0000, Zixin Wang a écrit :
> > +CPU isolation
> > +=============
> 
> Isn't it kind of duplicating Documentation/admin-guide/cpu-isolation.rst ?

That is why you are here. I would suggest a minimum here to make sense
and point the details to that one.

> > +
> > +.. caution::
> > +
> > +  CPU isolation is best effort.  Work that is explicitly bound to an
> > +  isolated CPU, such as per-CPU kernel threads, bound workqueues, and
> > +  interrupts, may still run there unless it is steered away.  Measure
> > +  the resulting latency with tools such as ``osnoise``, ``timerlat``,
> > +  and ``rtla`` rather than assuming that an isolated CPU is free of
> > +  kernel noise.  See Documentation/timers/no_hz.rst and
> 
> And cpunoise but that's all in Documentation/admin-guide/cpu-isolation.rst
> 
> > +RCU callback offloading
> > +=======================
> > +
> > +``CONFIG_RCU_NOCB_CPU`` in
> > +Documentation/core-api/real-time/kernel-configuration.rst enables support
> > +for offloading RCU callback invocation from selected CPUs to per-CPU
> > +``rcuo`` kthreads.  The offload is selected with ``rcu_nocbs=``, implied
> > +by ``nohz_full=``, or enabled for all CPUs by
> > +``CONFIG_RCU_NOCB_CPU_DEFAULT_ALL`` when neither parameter is given.
> > +
> > +``rcu_nocbs[=cpu-list]``
> > +  Offload RCU callback invocation from the listed CPUs to the
> > +  corresponding ``rcuo`` kthread, which can run on a housekeeping CPU.
> > +  This reduces callback-processing jitter on the CPU that enqueued them.
> > +  On a non-real-time kernel this also moves invocation out of softirq
> > +  context; with PREEMPT_RT, callbacks already run in kthread context
> > +  because ``rcutree.use_softirq`` is false, and the offload only changes
> > +  where they run.  If the parameter is given without a CPU list, no CPU
> > +  is offloaded at boot; the mode can still be toggled at runtime through
> > +  cpusets.  The parameter takes precedence over
> > +  ``CONFIG_RCU_NOCB_CPU_DEFAULT_ALL``.
> > +
> > +``rcu_nocb_poll``
> > +  Make the ``rcuo`` kthreads poll for callbacks instead of requiring the
> > +  offloaded CPUs to wake them.  This improves the real-time response at
> > +  the cost of higher power consumption, because the kthreads wake up
> > +  periodically to do the polling.  Consider this option only when wakeup
> > +  latency matters more than power.
> 
> Does nocb polling really improve real time response?
> I have doubts.
> 
> It checks callbacks and grace periods every jiffy instead of waiting
> for actual callbacks and grace period events.
> 
> This means introducing jiffy worst case latencies.

The wording is the old "RCU documentation" and it is a bit strong. The
"power consumption" comes from the part that the RCU threads are woken
up to check for work. The better improved "real-time response" response
comes the fact things like call_rcu() do less work (in their IRQ-off
section, including waking a task) so the critical section is smaller.
I wouldn't expect a huge difference except on small HW where every
opcode becomes visible.

> Thanks.

Sebastian

      parent reply	other threads:[~2026-11-25 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  7:46 Zixin Wang
2026-11-25 10:44 ` Sebastian Andrzej Siewior
2026-11-25 13:20 ` Frederic Weisbecker
2026-11-25 14:14   ` Zixin Wang
2026-11-25 15:01     ` Sebastian Andrzej Siewior
2026-11-25 14:52   ` Sebastian Andrzej Siewior [this message]

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=20261125145253.iWfxNCmy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=atomlin@atomlin.com \
    --cc=clrkwllms@kernel.org \
    --cc=corbet@lwn.net \
    --cc=darwi@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=w1355457260@gmail.com \
    --cc=wagi@monom.org \
    /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

all inboxes | Powered by JetHome®