Re: [PATCH v6] Documentation: real-time: Add runtime tuning guide
From: Sebastian Andrzej Siewior
Date: Wed Nov 25 2026 - 09:53:09 EST
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