Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp1543485rdb; Sat, 26 Aug 2023 07:01:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuVvfOs9Afp05Wvl4/NAQZmEjf1D73Ojib2HXi65ZGT68IiK+pdPp/uXELgOpIKue3xc38 X-Received: by 2002:a05:6a00:1d01:b0:68c:47f9:76f9 with SMTP id a1-20020a056a001d0100b0068c47f976f9mr255046pfx.10.1693058491309; Sat, 26 Aug 2023 07:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693058491; cv=none; d=google.com; s=arc-20160816; b=XFwrvVBxMBFbKcB8DHmuRDN0UyNGy4Fs5ceX8CyGTMTVCGuAy0x0yKnZv6Pt8Pudsi 8txcSMeriU8O/UId+0HsrMfjuzvuPsKy34yon3f/PgDI3vRUSf98k27WbOljbg0FS+4l szb7j0nyUW/LsqmGno1zWqFvnbVlUJgRcDAn7CBivlvnIcIzzga5dueN/Niz1QzLvX2M k9d6PoD02LFoL5lZ+eP2Xjqef14DddbMMgSMYfyJaz22luq+hU8t+knoPaeZWwQG+Xz5 F5omwM0DCSh3HCSEJEiWhr2Gajt83KHjTz8b54C4FlROzH0v15p9T7pWcIVAwU0Tb9ZP ZcRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xuKnWGZyIcT/eMphDFuolKAaqA/D7HA0cnLPgtzD694=; fh=NZSqYL2tVJZyXSBM/2QFFtDxa6PINNZgXOYxwoGasQI=; b=RsmCwhPvDO9umHxHZpW1u7HPcTEtNWDC/9cGp4/6SPHwbRpIABaNrGV76nWXvPOO5o xTO5McjvNXKyNoUZq45fTBNY3rO9NhznD+n0o7yXhlauQlZCgauVvJQa+ND9uPjkAUcI zqIHN2hU/fNEi3CNQrJvNXLiMxRzn2A13zRqMJZQASm11KOsHXDqOhedkgp9Ybv3aMZ8 FYRQqMSqDnZpEHmws5ULujbgpZbKRfgaPQWR3sFFZZUReTOZ1xVaONeyfhpnCVu1a4UE hEJv1tXP/gqLKW9hKuT6WfXzmVdtxF05dOH9c6lxyXrb3isKTYqMFESJLC+GX3Lmd5kZ 8bNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ANqv4QfT; 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 fb10-20020a056a002d8a00b0068891137bcbsi4096355pfb.34.2023.08.26.07.00.56; Sat, 26 Aug 2023 07:01:31 -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=ANqv4QfT; 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 S231640AbjHZBcS (ORCPT + 99 others); Fri, 25 Aug 2023 21:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbjHZBcB (ORCPT ); Fri, 25 Aug 2023 21:32:01 -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 07743E77; Fri, 25 Aug 2023 18:32:00 -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 9319363AAB; Sat, 26 Aug 2023 01:31:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2118C433C7; Sat, 26 Aug 2023 01:31:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693013519; bh=DAutNTAY/ejhXzgY0hUUg+eAqe9e6XFYvIOoeeMEoaM=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=ANqv4QfTZuKw5zyFuBtB182Ysp3R0j8fyYPO8WI2AeQ/lp3iTtpi2BhN/F9StTRGw /RvrhruEutb6IEX2WPEojptUe6dL6wGN6x4OPrXBuSSG9ze2psWi5AVO/4K4Kk1+UQ Ak2d9E+5sBkXoZPSj9pUQu5c3ljIv5Zc4lO6mb0+cyg97mb1XQUU6Jq+FYCbyWSkZX zXmXRKTzjza1mEb5EnrU0Yo1XOSWn9Cq03UGZ+NCFveLSMTO5uX/Lot/RR8NtTkICY a60oxeRx4yfwH0soQwyO0M5LjX4rVwkNNMoGsnuRDp++mGnQb1Jna3LwshihhfrHaH uxy9FrA2BpGsQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 6A1B3CE137E; Fri, 25 Aug 2023 18:31:56 -0700 (PDT) Date: Fri, 25 Aug 2023 18:31:56 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, Davidlohr Bueso , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , rcu@vger.kernel.org Subject: Re: [PATCH] rcutorture: Replace schedule_timeout*() 1 jiffie waits with HZ/20 Message-ID: <20f4de24-d7f1-4a10-bb32-b9d39773c9a6@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20230816204913.450457-1-joel@joelfernandes.org> <530be59f-96a9-4b2b-8be3-af837d7cbe3a@paulmck-laptop> <20230825025538.GF4008060@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230825025538.GF4008060@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 On Fri, Aug 25, 2023 at 02:55:38AM +0000, Joel Fernandes wrote: > On Wed, Aug 23, 2023 at 02:07:55PM -0700, Paul E. McKenney wrote: > > On Wed, Aug 16, 2023 at 08:49:12PM +0000, Joel Fernandes (Google) wrote: > > > In the past, we see that spinning on schedule_timeout* with a wait of 1 > > > jiffie can hang the kernel. See d52d3a2bf408 ("torture: Fix hang during > > > kthread shutdown phase"). > > > > > > Recently again it showed up in torture's stutter code as well. The behavior is > > > the the function may instantly return and never go to sleep preempting whatever > > > was running under it. > > > > > > To prevent future issues, apply the same fix mentioned in the above > > > commit d52d3a2bf408 to more places. > > > > > > I took care to only apply it to places where I thought it made sense. > > > > > > Signed-off-by: Joel Fernandes (Google) > > > > Hearing no objections, I applied this for further review and testing. > > > > In the future, should some of these become hrtimers? > > Yes they certainly could be but we don't need these ones to be high > resolution AFAICS and the jiffie granularity should be good. True, but wouldn't avoiding the repeated wakeups, even at the lower frequency, be of some value? Thanx, Paul