Re: [sched/pelt] e906550aca: WARNING:at_kernel/sched/fair.c:#update_blocked_averages

From: Dietmar Eggemann
Date: Thu Jun 03 2021 - 06:50:47 EST


On 02/06/2021 08:45, kernel test robot wrote:

[...]

> kern :warn : [ 40.989618] WARNING: CPU: 2 PID: 253 at kernel/sched/fair.c:8029 update_blocked_averages (kbuild/src/consumer/kernel/sched/fair.c:8029 kbuild/src/consumer/kernel/sched/fair.c:8065 kbuild/src/consumer/kernel/sched/fair.c:8152)

Hit something like this on my Ubuntu i7-7567U as well.

With more debugging:

[ 7.388006] WARNING: CPU: 1 PID: 926 at kernel/sched/fair.c:8029 update_blocked_averages+0x30d/0x7e0
...
[ 7.388167] path=/autogroup-2 load_avg=1 util_avg=0 runnable_avg=1

IMHO, this is because this patch needs:

(1) sched/pelt: ensure that *_sum is always synced with *_avg (2021-06-03 Vincent Guittot)

https://lkml.kernel.org/r/20210601085832.12626-1-vincent.guittot@xxxxxxxxxx

(2) sched/fair: Keep load_avg and load_sum synced (2021-06-03 Vincent Guittot)

tip/sched/urgent 7c7ad626d9a0

Using both patches underneath makes this warning go away.