Re: [PATCH v3] sched/core: Skip rq->avg_idle update without a valid idle_stamp
Shubhang <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
Gentle ping for v3. I repeated the Hackbench comparison with multiple runs
per kernel. The reported thread and process cases stayed within about 1.5%
mean delta, with similar baseline run-to-run variation.
Please let me know if there are further concerns with this approach.
Thanks,
Shubhang Kaushik
On Fri, 7 Aug 2026, Shubhang Kaushik (Ampere) wrote:
> Fixes: 4b603f1551a73 ("sched: Update rq->avg_idle when a task is moved to an idle CPU")
> Reviewed-by: K Prateek Nayak <[email protected]>
> Acked-by: John Stultz <[email protected]>
> Signed-off-by: Shubhang Kaushik (Ampere) <[email protected]>
> ---
> Temporary tracing under hackbench load confirmed that
> update_rq_avg_idle() can be reached with rq->idle_stamp == 0.
> Hackbench showed no material regression versus v7.2-rc5 mainline.
>
> Related discussion:
> https://lore.kernel.org/r/[email protected]
>
> This is a narrower variant of the earlier proposal. It keeps the
> rq->idle_stamp guard in update_rq_avg_idle(), but intentionally does not
> stamp idle entry from set_next_task_idle(), preserving the existing
> newidle accounting model and avoiding force-idle/proxy-exec accounting
> concerns.
> ---
> Changes in v3:
> - Describe the sched_balance_newidle()/ttwu_pending path as an
> example of entering idle without a valid rq->idle_stamp.
> - Drop unlikely() from the idle_stamp check.
> - Add Acked-by from John Stultz.
>
> Link to v2: https://lore.kernel.org/r/[email protected]