Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5909525rwp; Mon, 17 Jul 2023 11:21:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlGHPyQBMgwFdGJsYnFuyGD3OXrMZJzYTlfOQd9wlPFuuPAxBLXXNetxFTa1Qq4Isom9t7D7 X-Received: by 2002:a17:90a:318a:b0:263:911f:499e with SMTP id j10-20020a17090a318a00b00263911f499emr10757756pjb.0.1689618073913; Mon, 17 Jul 2023 11:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689618073; cv=none; d=google.com; s=arc-20160816; b=0RhjUPGooAhHw1QUEN6RQ2qQLUvhoGJKGL6UFUx2c4eyWHxHdu0OSAUm7hamIJ7/8B tkl1pHv0iRJy8rv2pMIVtgjOrLyWNzXz6SvPwVI8LAZp/Rwm1Q1GKQvenqtVbE/ecfOs mXrxC0YAwrNKQIW4hTBBdgSWIIXzm5eVE4ufvXmB/cevff8GolnY7yIgvyDB0GvidiXu 82XTF2XPs0EmYg6oA0fQPlJlVaY87SdkZu6F1m/grzG9uH91el6V94vlj+t3EnfaFhhB DMrOSSSDtEAomRi/r0OpX8cTc/mfxu0yJXbO5o6qwYjO6sQ7ta90bX9i0e6/peQD1YsF Pn7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xhyyX9hNMmCj4z7I7TYMRlaBBuvDLk5tX/Xm0o5G2WQ=; fh=OVhDZbgT60ppErFe2Ffd3WRhSDkYWLU8b8sQnSp+GtE=; b=ssSsW35vnDN6QvViPQWs8rnTCnVaSuJ+O895lNymfLSMg+kVUz9veuctVrbfs7PqPc RAzQPty9mhftbkcpbRWKWnnmpDSaYsi8NYzYD0oCB6zvhPLo6rLizpgu7ZJzWPaMxzrX fj/897+1nSfwMfQsTrEM+QgZbHm8slDCg2dYblFPICXZX5MWktPVTezlacadnzqLRwgJ Yp5O1A1Ac/2dU3cuzvMp95RE02JmszqRtWcMO0bopHMzbuMi0l8mJIOsvSZ90yemeduJ p9NPVOlB8mcuPJlsAdSDr7Z0DKOy2XrUeSZxt+AMRVCp81i7SmjKw/wGXc56q2eQftMJ T/9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FUHfGjun; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk13-20020a17090b33cd00b00262f7dccaecsi222593pjb.170.2023.07.17.11.21.01; Mon, 17 Jul 2023 11:21:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FUHfGjun; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231652AbjGQSMM (ORCPT + 99 others); Mon, 17 Jul 2023 14:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231250AbjGQSLp (ORCPT ); Mon, 17 Jul 2023 14:11:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A1EAF; Mon, 17 Jul 2023 11:11:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 45E28611F4; Mon, 17 Jul 2023 18:11:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 786EDC433BC; Mon, 17 Jul 2023 18:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689617500; bh=vix7h77GWNfJdMQzOHlK9PUbzIuAVD8zltRARIbDHYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FUHfGjun/+k6Z0PmRI8KVShnl9DhjSU7tH1B+TDkDpLdUve8i5qTejS/0nPDc1N78 cOTpC01MxYPlQkN3xlmysiTVlOc25XtpnkYVE29bgEQJ9xmUuE0vrh3l0AHsWc4qO7 MaVNyc/cGX44aqIyORtRoDsXEhFEk8/KOCZZMubTWu3lc4xKDo3kqbVcaMzCXz+hqH EjPgjruyq1Na8UN6joQy+8ZgDe2oa7NG3sRp7asYoInUoF9Em9Fh+ko1v1Ar7Y243k FiYE3KYwDOZ0QEk9kIKvn1ovcKiHLtEtbKofd/ED7EMdvCESnchVzVmpiXBXZ/D0Jj +Ggr0QWUDHlsQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id C6D12CE0A10; Mon, 17 Jul 2023 11:11:39 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, Zqiang , "Paul E . McKenney" Subject: [PATCH rcu 12/13] rcuscale: Move rcu_scale_writer() schedule_timeout_uninterruptible() to _idle() Date: Mon, 17 Jul 2023 11:11:37 -0700 Message-Id: <20230717181138.1098063-12-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zqiang The rcuscale.holdoff module parameter can be used to delay the start of rcu_scale_writer() kthread. However, the hung-task timeout will trigger when the timeout specified by rcuscale.holdoff is greater than hung_task_timeout_secs: runqemu kvm nographic slirp qemuparams="-smp 4 -m 2048M" bootparams="rcuscale.shutdown=0 rcuscale.holdoff=300" [ 247.071753] INFO: task rcu_scale_write:59 blocked for more than 122 seconds. [ 247.072529] Not tainted 6.4.0-rc1-00134-gb9ed6de8d4ff #7 [ 247.073400] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 247.074331] task:rcu_scale_write state:D stack:30144 pid:59 ppid:2 flags:0x00004000 [ 247.075346] Call Trace: [ 247.075660] [ 247.075965] __schedule+0x635/0x1280 [ 247.076448] ? __pfx___schedule+0x10/0x10 [ 247.076967] ? schedule_timeout+0x2dc/0x4d0 [ 247.077471] ? __pfx_lock_release+0x10/0x10 [ 247.078018] ? enqueue_timer+0xe2/0x220 [ 247.078522] schedule+0x84/0x120 [ 247.078957] schedule_timeout+0x2e1/0x4d0 [ 247.079447] ? __pfx_schedule_timeout+0x10/0x10 [ 247.080032] ? __pfx_rcu_scale_writer+0x10/0x10 [ 247.080591] ? __pfx_process_timeout+0x10/0x10 [ 247.081163] ? __pfx_sched_set_fifo_low+0x10/0x10 [ 247.081760] ? __pfx_rcu_scale_writer+0x10/0x10 [ 247.082287] rcu_scale_writer+0x6b1/0x7f0 [ 247.082773] ? mark_held_locks+0x29/0xa0 [ 247.083252] ? __pfx_rcu_scale_writer+0x10/0x10 [ 247.083865] ? __pfx_rcu_scale_writer+0x10/0x10 [ 247.084412] kthread+0x179/0x1c0 [ 247.084759] ? __pfx_kthread+0x10/0x10 [ 247.085098] ret_from_fork+0x2c/0x50 [ 247.085433] This commit therefore replaces schedule_timeout_uninterruptible() with schedule_timeout_idle(). Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney --- kernel/rcu/rcuscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index a0eae1900708..ffdb30495e3c 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -469,7 +469,7 @@ rcu_scale_writer(void *arg) sched_set_fifo_low(current); if (holdoff) - schedule_timeout_uninterruptible(holdoff * HZ); + schedule_timeout_idle(holdoff * HZ); /* * Wait until rcu_end_inkernel_boot() is called for normal GP tests -- 2.40.1