From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02D6DC77B75 for ; Mon, 22 May 2023 19:15:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233984AbjEVTO7 (ORCPT ); Mon, 22 May 2023 15:14:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234083AbjEVTOw (ORCPT ); Mon, 22 May 2023 15:14:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2C99102 for ; Mon, 22 May 2023 12:14:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BCCAC62734 for ; Mon, 22 May 2023 19:14:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDF12C433D2; Mon, 22 May 2023 19:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684782879; bh=IjdKdNtNgSH9NqSq033UUdLL5Sfm0bJbX0T0TivktFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dbMUyQScOwTv7ja+r+XLmEPc+lLVP4X0FJMYqICDvPJtMuGn3nAMYv7KlmhFtsIk+ YQmadGmmWoRwk9a0OW9VTaq21F0HkFGAtB/HWrhMafl5pziC2bGCMh3BciT9YHGdlP ReON+1E2nWNE4ck1P2IeaUCvoer/sd8qCqmek0ng= 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.15 030/203] refscale: Move shutdown from wait_event() to wait_event_idle() Date: Mon, 22 May 2023 20:07:34 +0100 Message-Id: <20230522190355.799336206@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230522190354.935300867@linuxfoundation.org> References: <20230522190354.935300867@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 66dc14cf5687e..5abb0cf52803a 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -777,7 +777,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