Re: [PATCH 7/7 v3] sched/fair: reduce the window for duplicated update
From: Valentin Schneider
Date: Fri Feb 12 2021 - 14:21:04 EST
On 12/02/21 15:17, Vincent Guittot wrote:
> Start to update last_blocked_load_update_tick to reduce the possibility
> of another cpu starting the update one more time
>
IIUC this can happen if e.g. a CPU is busy updating load in
update_blocked_averages() while another enters update_nohz_stats() for the
same rq. They'll be serialized by the RQ lock, but both can still enter
update_blocked_averages() at roughly the same time.
Shouldn't then the rq->last_blocked_load_update_tick check be either
deferred to or re-done within update_blocked_averages(), with the rq lock
held?