Re: [PATCH 3/5] sched/fair: Call update_curr() before unthrottling the hierarchy
From: Benjamin Segall
Date: Thu May 28 2026 - 18:08:04 EST
K Prateek Nayak <kprateek.nayak@xxxxxxx> writes:
> Subsequent commits will allow update_curr() to throttle the hierarchy
> when the runtime accounting exceeds allocated quota. Call update_curr()
> before the unthrottle event, and in tg_unthrottle_up() to catch up on
> any remaining runtime and stabilize the "runtime_remaining" and
> "throttle_count" for that cfs_rq.
>
> Doing an update_curr() early ensures the cfs_rq is not throttled right
> back up again when the unthrottle is in progress.
>
> Since all callers of unthrottle_cfs_rq(), except one, already update the
> rq_clock and call rq_clock_start_loop_update(), move the
> update_rq_clock() in unthrottle_cfs_rq() to the lonely caller that
> doesn't update the rq_clock.
Reviewed-By: Benjamin Segall <bsegall@xxxxxxxxxx>