Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp299907rdf; Fri, 3 Nov 2023 00:26:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvTnj7Q+uUH+wjFp7+h6+TU80mVan+Iu1iMLG0jvtV2vbOKp4iZsxx07w87xh9Al9wV2pD X-Received: by 2002:a05:6a20:2d0e:b0:15e:10e:2cc3 with SMTP id g14-20020a056a202d0e00b0015e010e2cc3mr19651812pzl.60.1698996419433; Fri, 03 Nov 2023 00:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698996419; cv=none; d=google.com; s=arc-20160816; b=XA5X8QM4PmSYOiUU4jZxdZH8NiT6t1YR50dAx9MgpTWeoFfaVvS0N8hYMNsda7fN9n GHnt46nR540/IA8RAM0qqkS9tlLkIfy4Qwn0aJ+letnMWDNUiXFM9n09TtK6xeuMY18W I+csNPJFdoKKUWNVI6n3ny61lvpKfeWa5hsj5ok9K6yUplVxrzdxkZY7Yf1x06mnCUNn X3M11kBLo2+o7y4tBuMsCMOMq/kb1oM3irMwmuoaYHOyTmTPTfRGV00X3xdhJBTjIVW8 mzbX35JvpoLHdw+8BC5a7VIGK+NfSfmlXSyoprIuKsWzFqVyaSrUXvBjXbTP0XD/y6uL omaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=cAgvdtIcQPX971sbAD4m0YcUgmn+p4/agvvmTkVVwws=; fh=6A/WgWowr3MjDd6Yuo8Ot7KrHR7lgRtzC3pQaPShFVI=; b=fsInLNirxIpsk67E5DLYJ2H3YY+jX4zEYiAcfmWhLTKrgvb31Kpf4u97oX5CX7u2fU 8R2iT9rT23QYzsu/vqBnHN3HLrUuBv2aV8lfdnBva7i2v0iIl4TeKC4xaa8/wSKlH4kM GteDQPKZXjOCCz+w9ytVBuUGNcTI7jJHfARcy+m1DC40+rlpnQmk79ErqlNOgpOri3bx 5PKrA0/IxBozCJSDR3c7w6NuczSZ/kxUufjVcKWZOMewDh4gVCnEN4t8SeuzmPpreanr +0GCql64f9HZlk5e95qGa0ccNJljfe/gD2LmLB/DpKK9qio9SjQH1GTBeKI5f/K8Tqcv 3vUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RIxMLPHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b3-20020a056a000cc300b006c34752a6e8si1090568pfv.81.2023.11.03.00.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 00:26:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RIxMLPHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 96DF68313340; Fri, 3 Nov 2023 00:26:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232511AbjKCH05 (ORCPT + 99 others); Fri, 3 Nov 2023 03:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjKCH04 (ORCPT ); Fri, 3 Nov 2023 03:26:56 -0400 Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F21D7184; Fri, 3 Nov 2023 00:26:51 -0700 (PDT) Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-1efa01323b4so987930fac.3; Fri, 03 Nov 2023 00:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698996409; x=1699601209; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cAgvdtIcQPX971sbAD4m0YcUgmn+p4/agvvmTkVVwws=; b=RIxMLPHcWnl2PvPYRttSRvVoJ71fezeH+pUmynO6wnZEwNJkGKUYGpu/XnrMCcSgdR 5hABNVLR12X5MVGR7H1/BiPz4aeb7NFWXPHq/7rFvZ60GDzPwO1Dv/jpHI0pQsKnEViq AidaSjhfsRtcD9uLTpSlg7kemYMSW9MEnuKUZedGmKfEOjD5BzHHMme/ZCvX0uu+KCzQ Jyy5aVz+ZMbHynohgfU/tF5I+7d1oUfStfnPeIu9LyzRfaQ/1bNjxVfxQE8H79lTrgsr uDxSYVTf+Raf2dpZU7DtRCSr2On7t8dzmQvTwXNnHKCN4X2IFL0bLSvHgt3WjQ39F8Cw QTHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698996409; x=1699601209; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cAgvdtIcQPX971sbAD4m0YcUgmn+p4/agvvmTkVVwws=; b=f5YAwpNy0c2fOh03FW7aIqYgD//XYRY5j5aEa9xvAnOKd3byTHZtS5Q0JWsRRNqxGp h/o2rI/RPisU5TpbGDk3gy1xQNDzZm+S7fwZXFBsFFWWCZs1bjhecQ25pu2D9PH1OtgO QRy9oZyL7YhTWStoxaOY7puX2hE62xjVQFvByvZTd9OKZfOJx6Z2ZzI9KoTlmuJ3Cks2 CCb45+OF4QovuA3lqO4SklQcDYUwjlQejN6Y0EfDSh6BMyy7sfMh4VCYia0ZL2h9sJxX bcZIvvrSdNmzeVI8dovFjEwRtBeL1KHPkeJe+aMUvP/rPAd1+lXtM5inel1EfJEnOTCe pLgQ== X-Gm-Message-State: AOJu0YxKf9EH3lmZ60Wvix3DXO0zIHwSFR1hB0uFqjEHlnuGAxndNESX LPNcbJ3AYgAErQ5OETscgA4= X-Received: by 2002:a05:6871:723:b0:1ef:a87f:5d52 with SMTP id f35-20020a056871072300b001efa87f5d52mr20315557oap.6.1698996408708; Fri, 03 Nov 2023 00:26:48 -0700 (PDT) Received: from MSCND1355B05.fareast.nevint.com ([183.242.39.186]) by smtp.gmail.com with ESMTPSA id b3-20020a63cf43000000b0056c2f1a2f6bsm773341pgj.41.2023.11.03.00.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 00:26:47 -0700 (PDT) From: Zqiang To: paulmck@kernel.org, frederic@kernel.org, joel@joelfernandes.org Cc: qiang.zhang1211@gmail.com, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rcutorture: Add fqs_holdoff check before the fqs_task is created Date: Fri, 3 Nov 2023 15:26:39 +0800 Message-Id: <20231103072639.11426-1-qiang.zhang1211@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 00:26:58 -0700 (PDT) For rcutorture tests that support fqs operations and set fqs_duration greater than zero, the fqs_task kthread will be created. but if the fqs_holdoff is not set, the default value is zero, this cause fqs_task enter a long-term busy loop and won't voluntarily give up the CPU until stopped by kthread_stop(). this commit therefore add for fqs_holdoff check before the fqs_task is created, make sure the fqs_task is created when the fqs_holdoff is also greater than zero. Signed-off-by: Zqiang --- 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 83999e57b3ea..9f0e6c1cad44 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -3886,7 +3886,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.17.1