Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4799708rdb; Tue, 12 Dec 2023 09:34:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyN6mX0jICItxs9IagX6QPDUN6BZfskJo8MsrTnXkXQrJRlgKY5JCpIyK1zHGiDsh68ui+ X-Received: by 2002:a17:903:647:b0:1d0:8e61:102a with SMTP id kh7-20020a170903064700b001d08e61102amr5624508plb.90.1702402497225; Tue, 12 Dec 2023 09:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702402497; cv=none; d=google.com; s=arc-20160816; b=H2PA7qMWtUW+96IoeLITwzrBN5bEUcWZJCGR2cGoKYIxfuW/qLnhhae8uAybmsQRck shMPRhRxhMMd8mcFFLyCuW2uvHqx+OqNeuhp+EfbBvv7Y2xHfOvKdzaRPjkjaA7nTAoy LyWzGJUtpZl5nnGMDi4m7jlmS5M4GSCh4pghL+DvTpfYJMjH1EpZ2+MXSmhEBDcSigEh XrZTHLaM2lJbKFtjk5rIUXtV6qC9sIKriv/EJqaBhdJlategAD1fUxSF+Z50JbFpcMPY jQHOS0bHbWXvnf9lkQBp1aYf9FioM8dqo1yCTHqaiqYyzv0uXGKhAokFLZ/hK2n0uIFD SDyw== 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=LjqNPmTsqEqqrVWfas3u5VADPjrH7KEM9DoAzSldHo8=; fh=8RfpOYN+nJKNcYB3XlCk21tjLy+CXyrPChTxeHORjzA=; b=nX2qMHdWbevNm/Dd08Zz7ttbtqrj47WxdVOi0EjYSx/22ttIyQvR+tEyQHT6f5+TK7 bbqPl1Rs3Ee/VqdJPKXnEjZJ4aTutYYDAGwHpoNKxr44YsEa+13hsggAJ6gmZPxaLczp WWMYePimfUpxi5VK2fZk4h64pusIXWcGyYM9ybQs/KXIKYwSDo/eS25q2j1d0pfoG/0r B01dvVLm90BMreMtrQUrKivPUcT26g++vtf3WuMl9eXdRF6vGjUzIPuDSCkl2GPHGH1q DHBCzCiU+Z95wskZbYplyop6kTR6XsKk03I9TjtHyabSsf4n5Abel6M0dY1CF7oiZt3o Yp1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C2efV6wn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id t3-20020a63eb03000000b005c6183ccab2si8005062pgh.630.2023.12.12.09.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 09:34:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C2efV6wn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id F238980239C4; Tue, 12 Dec 2023 09:34:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235127AbjLLReg (ORCPT + 99 others); Tue, 12 Dec 2023 12:34:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235135AbjLLRed (ORCPT ); Tue, 12 Dec 2023 12:34:33 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2302CF; Tue, 12 Dec 2023 09:34:39 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5bdb0be3591so4932404a12.2; Tue, 12 Dec 2023 09:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702402479; x=1703007279; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LjqNPmTsqEqqrVWfas3u5VADPjrH7KEM9DoAzSldHo8=; b=C2efV6wnQoeNuG1XKhWn2EH7YE8h3aRgl0xJBF4kyooXrLhdy2PlNb+G+Jm2GRlJWK hmwtgBLvJgKYQ0csInWxFSh0nl77YYQ2uttXKsCjvUJruJG/CZQlLMxBKGp+fRO7qWJZ bztBfZqlK4RRejx5+/ricNkNK6sq0gka1j9emqOQ3AgGQZJD/+jqDmofRBNsVA/A39rX 2rJLbQ1Vr2wnwS/7YfVSEXV4t6dnQijanazZJJM3w0HxIKCgfqbUkYilN7TD3eyVOsda HXeaUrAYZBpujWINircmBTHZkNIN9zpgROgy6MF9Hc5iQdgTLLGJvhUi8rDUcr8AWVMa pBxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702402479; x=1703007279; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LjqNPmTsqEqqrVWfas3u5VADPjrH7KEM9DoAzSldHo8=; b=QP/PsPXD3S/a4mPZ943bXuMeoWJrmNJQ+r/8VMRKtuAaYv/tnR6RSS9Q1Ccp06m/AB KifxfFhHS6P8mCpCxzfsTzI0NqCNCk4mcd7tEDu7XBrzbxbPXCzOJ4AkIg9C4/n0msBZ kXJsYzq9RZLTLPFJJd10cIQQKAEgE1dO3ilDMyl49uytY92ppCT/sc4iEdBN6HhxXVSC twuLXsLBpNAaRdgF4FiggsLDEP1BRqjw82i8OGDi1T9fTWEH4qLpvTshu4FHTqZ0M/pr fV4er5VNHqPsOxmUOQ2q/Auwd4E2oKoKavYaW23AGhdj8ImJ3YN+vOzXsAwJV3wTV+TE Wjcw== X-Gm-Message-State: AOJu0YwTQnq0BxjSFgIgyorOVTrQlCgNxzmYH6z8lQJTniMMea4AZC8R u7Rn2pFrXfexWHVpFltem2t5O/uNTB2331NG X-Received: by 2002:a17:90b:1e07:b0:286:6cc1:3f25 with SMTP id pg7-20020a17090b1e0700b002866cc13f25mr5109756pjb.92.1702402478556; Tue, 12 Dec 2023 09:34:38 -0800 (PST) Received: from localhost.localdomain ([101.0.63.152]) by smtp.gmail.com with ESMTPSA id nc4-20020a17090b37c400b00285545ac9d2sm9213862pjb.47.2023.12.12.09.34.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 09:34:38 -0800 (PST) From: "Neeraj Upadhyay (AMD)" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, paulmck@kernel.org, Neeraj.Upadhyay@amd.com, Zqiang , Neeraj Upadhyay Subject: [PATCH rcu 4/4] rcutorture: Add fqs_holdoff check before fqs_task is created Date: Tue, 12 Dec 2023 23:04:14 +0530 Message-Id: <20231212173414.11602-4-neeraj.iitr10@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231212173334.GA11572@neeraj.linux> References: <20231212173334.GA11572@neeraj.linux> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 12 Dec 2023 09:34:55 -0800 (PST) From: Zqiang For rcutorture tests on RCU implementations that support force-quiescent-state operations and that set the fqs_duration module parameter greater than zero, the fqs_task kthread will be created. However, if the fqs_holdoff module parameter is not set, then its default value of zero will cause fqs_task enter a long-term busy loop until stopped by kthread_stop(). This commit therefore adds a fqs_holdoff check before the fqs_task is created, making sure that whenever the fqs_task is created, the fqs_holdoff will be greater than zero. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) --- kernel/rcu/rcutorture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 30fc9d34e329..a0b2520bd32b 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -3872,7 +3872,9 @@ rcu_torture_init(void) } if (fqs_duration < 0) fqs_duration = 0; - if (fqs_duration) { + if (fqs_holdoff < 0) + fqs_holdoff = 0; + if (fqs_duration && fqs_holdoff) { /* Create the fqs thread */ firsterr = torture_create_kthread(rcu_torture_fqs, NULL, fqs_task); -- 2.40.1