Re: [PATCH] kthread: set kthread state to TASK_IDLE.

From: Peter Zijlstra
Date: Wed Apr 01 2020 - 05:39:16 EST


On Wed, Apr 01, 2020 at 02:52:15PM +0800, liyueyi wrote:
> From: liyueyi <liyueyi@xxxxxxxxxx>
>
> Currently kthread() sleeps in TASK_UNINTERRUPTIBLE state waiting
> for the first wakeup, it may be detected by DETECT_HUNG_TASK if
> the first wakeup is coming later. Since kernel has introduced
> TASK_IDLE, change kthread state to TASK_IDLE.

How the heck can that ever happen anyway? Is this some virt
brain-damage?

And how is it not a real problem when it takes this long?