Re: [External] Re: [PATCH v5 2/4] sched/core: Avoid double calling update_rq_clock() in __balance_push_cpu_stop()

From: Peter Zijlstra
Date: Fri Jun 16 2023 - 05:18:55 EST


On Fri, Jun 16, 2023 at 03:56:25PM +0800, Hao Jia wrote:

> I'm afraid not, the rq clock also needs to be updated before
> select_fallback_rq() is called.

> If we just remove update_rq_clock() from __balance_push_cpu_stop(), we will
> get this warning.
>
>
> [ 1260.960166] rq->clock_update_flags < RQCF_ACT_SKIP
> [ 1260.960170] WARNING: CPU: 25 PID: 196 at kernel/sched/sched.h:1496
> update_curr+0xf6/0x1f0
>
> [ 1260.960318] Call Trace:
> [ 1260.960320] <TASK>
> [ 1260.960359] dequeue_entity+0x3b/0x410
> [ 1260.960361] dequeue_task_fair+0xc7/0x3c0
> [ 1260.960363] dequeue_task+0x30/0xf0
> [ 1260.960365] __do_set_cpus_allowed+0x94/0x130
> [ 1260.960366] do_set_cpus_allowed+0x38/0x60
> [ 1260.960368] cpuset_cpus_allowed_fallback+0x70/0x80
> [ 1260.960372] select_fallback_rq+0x20f/0x250 <----

Urgh... :-(