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 5B932171A9 for ; Mon, 22 May 2023 19:38:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C265DC433A1; Mon, 22 May 2023 19:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684784309; bh=t841XQQ4a7c0wNDzlCr4li8lUG9wtgw47/ee9uHSC0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=euEb8v65h4tqMOa9AHitWR+sxb+oRIyMOiOd2qDL4lG+YDAppZZD0bG+en65C7VYX kCcb5zDt2T1YVeiOc/PpUlOzNr3RHxTYECl165PLu4QbkHf5dbwFEgDbHgflKKlDbj T6sSPVnHe7Kmjen/i4sNpMHRR3/b5+BwMWONzpRM= 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 6.3 040/364] refscale: Move shutdown from wait_event() to wait_event_idle() Date: Mon, 22 May 2023 20:05:45 +0100 Message-Id: <20230522190413.836212191@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230522190412.801391872@linuxfoundation.org> References: <20230522190412.801391872@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 afa3e1a2f6902..1970ce5f22d40 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(); -- 2.39.2