Re: [PATCH v4] sched/fair: Replace random newidle_balance with Bresenham accumulator

From: Qing Wang

Date: Fri Oct 30 2026 - 06:28:41 EST


On Fri, 30 Oct 2026 at 17:56, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> Funnily enough, treating this as an independent variable and using a
> random number works and 'fixes' the slope change problems.

Hi Peter,

I explained this in the v3 thread: on a slope change, carrying
newidle_window_pos over from the previous window only shifts the
first allowed balance in the new-slope window (512 calls) earlier or
later; subsequent balances are still uniformly spaced. So the
initial value can be anything — it doesn't matter.

--
Best regards,
Qing