Re: [PATCH] sched/core: Avoid WARN_DOUBLE_CLOCK warning when CONFIG_SCHED_CORE

From: Peter Zijlstra
Date: Mon Jan 16 2023 - 06:19:50 EST


On Tue, Dec 06, 2022 at 03:05:50PM +0800, Hao Jia wrote:
> When we need to call update_rq_clock() to update the rq clock of
> other CPUs on the same core, before that we need to clear RQCF_UPDATED
> of rq->clock_update_flags to avoid the WARN_DOUBLE_CLOCK warning.
> Because at this time the rq->clock_update_flags of other CPUs
> may be RQCF_UPDATED.

So you've found that the WARN_DOUBLE_CLOCK machinery doesn't work for
core-sched -- but then instead of fixing that machinery, you put
band-aids on it :/