From: Paul E. McKenney Date: Wed, 1 Feb 2023 00:12:18 +0000 (-0800) Subject: refscale: Move shutdown from wait_event() to wait_event_idle() X-Git-Tag: v6.6.7~3067^2^6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bc6e6b27524304aadb9c04611ddb1c84dd7617a;p=platform%2Fkernel%2Flinux-starfive.git refscale: Move shutdown from wait_event() to wait_event_idle() The ref_scale_shutdown() kthread/function uses wait_event() to wait for the refscale test to complete. However, although the read-side tests are normally extremely fast, there is no law against specifying a very large value for the refscale.loops module parameter or against having a slow read-side primitive. Either way, this might well trigger the hung-task timeout. This commit therefore replaces those wait_event() calls with calls to wait_event_idle(), which do not trigger the hung-task timeout. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index afa3e1a..1970ce5 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -1031,7 +1031,7 @@ ref_scale_cleanup(void) static int ref_scale_shutdown(void *arg) { - wait_event(shutdown_wq, shutdown_start); + wait_event_idle(shutdown_wq, shutdown_start); smp_mb(); // Wake before output. ref_scale_cleanup();