Re:Re: [PATCH V2] workqueue: watchdog: update wq_watchdog_touched for unbound lockup checking

From: 王擎
Date: Sun Mar 21 2021 - 21:48:17 EST



>On Fri, Mar 19, 2021 at 04:00:36PM +0800, Wang Qing wrote:
>> When touch_softlockup_watchdog() is called, only wq_watchdog_touched_cpu
>> updated, while the unbound worker_pool running on its core uses
>> wq_watchdog_touched to determine whether locked up. This may be mischecked.
>
>Can you please elaborate here, preferably with a concrete scenario where the
>new code is better?

The previous code is problematic for judging whether the unbound pool is locked up:
When the expected single cpu stall occurs, only wq_watchdog_touched_cpu is updated,
However, the unbound pool uses wq_watchdog_touched to determine whether it is
locked up, so when the unbound pool is running in a scenario where the cpu stall is
expected, a misjudgment will occur, because wq_watchdog_touched only be update
when all the cpu stall as expect.

So we need to update wq_watchdog_touched in touch_softlockup_watchdog(), and it is
only used for unbound pool, it will not affect the bound pool in any way.

Thanks,

Qing

>
>Thanks.
>
>--
>tejun