Re: [PATCH] hungtask: add filter kthread/check comm

From: Michal Hocko
Date: Tue May 25 2021 - 03:26:19 EST

On Tue 25-05-21 11:27:16, 陈冠有 wrote:
> These are MTK's LPM designs.

No idea what those are but it seems like an out of tree code.

> If we have linux-api, hungtask can choose to skip kthread, helpful for us
> to debug user space threads in "state=D" when enable hungtask panic.

No, this approach is wrong. You are trying to workaround an incorrect
out of tree code by creating a user visible API. I have already brought
that up in earlier version of this patch.

Nacked-by: Michal Hocko <mhocko@xxxxxxxx>

Andrew has already given you a lead on how to fix the said code. Use
TASK_IDLE when waiting for an event. This will both hide that waiting
task from load average accounting and also from the hung task detector.
Michal Hocko