[Devel] [PATCH VZ10 v2] fs/fuse kio: avoid hung-task warning on krpc_watcher

Alexey Kuznetsov kuznet at virtuozzo.com
Mon Jun 8 18:20:20 MSK 2026


Acknowledged

I never used this before. But it looks legit, workqueues use this thing.

On Mon, Jun 8, 2026 at 3:26 PM Liu Kui <kui.liu at virtuozzo.com> wrote:
>
> The wait_event() puts the watcher task in TASK_UNINTERRUPTIBLE state
> that still contributes to system load, so a long-lived watched process
> triggers khungtaskd:
>
>   INFO: task krpc_watcher:225326 blocked for more than 1228 seconds.
>
> Use wait_event_idle() instead to put the task in TASK_IDLE state
> without contributing to system load.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-134207
>
> Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
> ---
>  fs/fuse/kio/pcs/pcs_krpc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c
> index 7d5a9619276d..3b42fd7d4489 100644
> --- a/fs/fuse/kio/pcs/pcs_krpc.c
> +++ b/fs/fuse/kio/pcs/pcs_krpc.c
> @@ -669,7 +669,7 @@ static int krpc_watcher_fn(void *data)
>  {
>         struct pcs_krpc_set *krpcs = data;
>
> -       wait_event(krpcs->watched_pid->wait_pidfd,
> +       wait_event_idle(krpcs->watched_pid->wait_pidfd,
>                         process_has_exited(krpcs->watched_pid) || kthread_should_stop());
>
>         kthread_stop(krpcs->sender_task);
> --
> 2.50.1 (Apple Git-155)



More information about the Devel mailing list