From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CB1C6121 for ; Sun, 28 May 2023 19:41:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0183C433EF; Sun, 28 May 2023 19:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1685302865; bh=KwKX2FFErHLJgSy1B23prHXZQxaBsxakViNuii6dsGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cmMlFtA9a58udKzNdwfaU90Ua+6o19daRDAQZasHUqoQGE3tyy7kT0rd7PsjXnStq pQrebxXueRMgVXdzUC4JXF7CpMYJibxeOv8lw4atSnw0zlqQOuyiv95yYuG4cZD625 k/UlRbZHbeJoyaBlSAC7P0Y5w2bKNvrjRaxceXwY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Paul E. McKenney" , Boqun Feng , Sasha Levin Subject: [PATCH 5.10 030/211] refscale: Move shutdown from wait_event() to wait_event_idle() Date: Sun, 28 May 2023 20:09:11 +0100 Message-Id: <20230528190844.271045950@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230528190843.514829708@linuxfoundation.org> References: <20230528190843.514829708@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Paul E. McKenney [ Upstream commit 6bc6e6b27524304aadb9c04611ddb1c84dd7617a ] 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 Signed-off-by: Sasha Levin --- kernel/rcu/refscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index 952595c678b37..4e419ca6d6114 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -625,7 +625,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(); -- 2.39.2