From patchwork Mon Jul 17 18:20:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 13316241 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 606B0C001DE for ; Mon, 17 Jul 2023 18:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231304AbjGQSUu (ORCPT ); Mon, 17 Jul 2023 14:20:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231479AbjGQSUs (ORCPT ); Mon, 17 Jul 2023 14:20:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5141A10D9; Mon, 17 Jul 2023 11:20:45 -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 B210E611ED; Mon, 17 Jul 2023 18:20:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16608C433D9; Mon, 17 Jul 2023 18:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689618044; bh=sBPRM0sRIpbE6zvq9jaA1AWHNVj70yVAkkvNX0VwPQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y7sDl/2TGu3C45dkI0F4XlyVjTIewa8HrGGM02f8RgU52YHwQIvUdt258iRQNEm07 1FEHY4Sey3+dPfRnWR5l4rBPoEyH35xaoG4NtYBFi05CqQYLYejMMCZtf+WY/pYitY KmBso4AwVMnl3T1YpW4hK6NkH3ifnoMqdq6On8/uluQmg3Ux/jQnZU8r8yi2UbD4Uw Wsr5KU2WVaKk3NRUxAoZ3uYA5U5dkHXP2OiFFSUF+ARnPawDno261V91VCR3zd09Cz X7IiGC4Mw7WexuHXpj2NBMX2f0v0hksb2CJ5D7ZRnOyKcz7qL3qBpVK7hjTYd37MH2 7pt0mQiFgQWUw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 9510DCE0902; Mon, 17 Jul 2023 11:20:43 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH rcu 5/9] torture: Move torture_onoff() timeouts to hrtimers Date: Mon, 17 Jul 2023 11:20:38 -0700 Message-Id: <20230717182042.1098651-5-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org In order to gain better race coverage, move the CPU-hotplug-related timed waits in torture_onoff() to torture_hrtimeout_jiffies(). Signed-off-by: Paul E. McKenney --- kernel/torture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/torture.c b/kernel/torture.c index 836fefa44373..fc873116a399 100644 --- a/kernel/torture.c +++ b/kernel/torture.c @@ -357,12 +357,12 @@ torture_onoff(void *arg) if (onoff_holdoff > 0) { VERBOSE_TOROUT_STRING("torture_onoff begin holdoff"); - schedule_timeout_interruptible(onoff_holdoff); + torture_hrtimeout_jiffies(onoff_holdoff, &rand); VERBOSE_TOROUT_STRING("torture_onoff end holdoff"); } while (!torture_must_stop()) { if (disable_onoff_at_boot && !rcu_inkernel_boot_has_ended()) { - schedule_timeout_interruptible(HZ / 10); + torture_hrtimeout_jiffies(HZ / 10, &rand); continue; } cpu = (torture_random(&rand) >> 4) % (maxcpu + 1); @@ -372,7 +372,7 @@ torture_onoff(void *arg) torture_online(cpu, &n_online_attempts, &n_online_successes, &sum_online, &min_online, &max_online); - schedule_timeout_interruptible(onoff_interval); + torture_hrtimeout_jiffies(onoff_interval, &rand); } stop: