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

Liu Kui kui.liu at virtuozzo.com
Mon Jun 8 10:14:19 MSK 2026


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