From mboxrd@z Thu Jan 1 00:00:00 1970 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 1786AC433FE for ; Thu, 17 Nov 2022 14:27:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239550AbiKQO1R (ORCPT ); Thu, 17 Nov 2022 09:27:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240425AbiKQO05 (ORCPT ); Thu, 17 Nov 2022 09:26:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF6679E37; Thu, 17 Nov 2022 06:26:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61CC161EB0; Thu, 17 Nov 2022 14:26:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4473BC433C1; Thu, 17 Nov 2022 14:26:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668695211; bh=D1wwaHLrcK7v98VTHcsp0E+y8XbdwP5RwD0WwgWL2o0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h7rZTPAT0gEHyEj2BGoOmE0ex1yRgX9Y7rkCasrlSear/w5e7Nt+uw1ZeXYWi2KUb /ZbFtFTa804+yGKSjj+bcodLz/KBzO0zR/nwMwsqoW/AzNVgIq+3r+Muvn/4GSZFBr fu/e2ttYP4ycVWdSgfFS9oDkXRw0hxiU/kPUwcYA+orGgFjCnUgVnedetXAJp1Kbot cqTfR++pT87Iib3hWvgv7orzwKsJGSVnbCYcDskBBNTPP4VeQma9gNGFBj789z6D0Z ftPFs8G+LPHU95xCGugNhDHawf30A4ycxpS8h0XbrQPs4vWvrKx19XCwYQendraeU8 esQe+IfLZs9CA== Date: Thu, 17 Nov 2022 15:26:48 +0100 From: Frederic Weisbecker To: "Leizhen (ThunderTown)" Cc: "Paul E . McKenney" , Neeraj Upadhyay , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Elliott Subject: Re: [PATCH v7 4/6] rcu: Add RCU stall diagnosis information Message-ID: <20221117142648.GF839309@lothringen> References: <20221111130709.247-1-thunder.leizhen@huawei.com> <20221111130709.247-5-thunder.leizhen@huawei.com> <20221116223942.GA838972@lothringen> <20221117122238.GC839309@lothringen> <54aa07c4-b7e3-1a0e-e6a3-444573caba16@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54aa07c4-b7e3-1a0e-e6a3-444573caba16@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 17, 2022 at 09:25:44PM +0800, Leizhen (ThunderTown) wrote: > > > On 2022/11/17 20:22, Frederic Weisbecker wrote: > > On Thu, Nov 17, 2022 at 09:57:18AM +0800, Leizhen (ThunderTown) wrote: > >> > >> > >> On 2022/11/17 6:39, Frederic Weisbecker wrote: > >>> On Fri, Nov 11, 2022 at 09:07:07PM +0800, Zhen Lei wrote: > >>>> @@ -262,6 +279,8 @@ struct rcu_data { > >>>> short rcu_onl_gp_flags; /* ->gp_flags at last online. */ > >>>> unsigned long last_fqs_resched; /* Time of last rcu_resched(). */ > >>>> unsigned long last_sched_clock; /* Jiffies of last rcu_sched_clock_irq(). */ > >>>> + struct rcu_snap_record snap_record; /* Snapshot of core stats at half of */ > >>>> + /* the first RCU stall timeout */ > >>> > >>> This should be under #ifdef CONFIG_RCU_CPU_STALL_CPUTIME > >> > >> This will not work for now because we also support boot option > >> rcupdate.rcu_cpu_stall_cputime. > > > > I'm confused. If CONFIG_RCU_CPU_STALL_CPUTIME=n then rcupdate.rcu_cpu_stall_cputime has > > no effect, right? > > No, rcupdate.rcu_cpu_stall_cputime override CONFIG_RCU_CPU_STALL_CPUTIME. Because > the default value of CONFIG_RCU_CPU_STALL_CPUTIME is n, so in most cases, we need > rcupdate.rcu_cpu_stall_cputime as the escape route. > > If CONFIG_RCU_CPU_STALL_CPUTIME=y is default, your suggestion is more > appropriate. Oh ok I thought it was a support Kconfig switch. Then please just mention that rcupdate.rcu_cpu_stall_cputime overrides CONFIG_RCU_CPU_STALL_CPUTIME behaviour in the Kconfig help text. Thanks.