Re: [PATCH v7 12/12] sched, virt/steal_monitor: Keep tick on for faster push on nohz_full CPU

From: Shrikanth Hegde

Date: Fri Jul 10 2026 - 02:36:05 EST


Hi.

On 7/10/26 3:26 AM, Shrikanth Hegde wrote:
Enable tick on nohz full CPU when it is marked as non-preferred.
This helps to push the task out faster and in more predictable
manner on nohz_full CPUs.

Steal time handling code will call tick_nohz_dep_set_cpu with
TICK_DEP_BIT_SCHED. This helps to push the task out of nohz_full
faster as push task depends on tick.

If there is pinned task on non-preferred CPU, it may not stop the tick.
That is rare case. Even then, this preferred CPU state change can
happen only inside the guest. So even if guest stop the tick,
it may not necessary mean power saving since host disabling the
tick is what matters more.

sched_can_stop_tick flow doesn't change if cpu_preferred. On disabling
the feature, module ensure it restores the CPU as preferred.

Signed-off-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
---

I will drop this patch 12 as it is an optimization for rare case.

The reason being,
- If there is one pinned task, it leaves the tick on.
- Can't just the clear the tick while disable, that will cause break.
- need to know if there was one pinned task in sched_can_stop_tick
which is tricky.
- optimization is applicable only for a forever running thread on nohz_full
CPU and non-pinned. Such use case is rare i think.

and

- Task eventually move out that nohz_full CPU, it takes a few more
seconds. Likely it happens on natural boundary, maybe a external
interrupt, background workqueue or kthread etc.

- One configures nohz_full CPU carefully. If the need arises,
lets bother about at that time.