Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2503509rwr; Fri, 28 Apr 2023 11:12:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72KsWxIimb3sfMEk396Lk9eD3HTDPv2x3NlyYJGv6M5Y1o+O6AicNA3sNAXBWkeSPFYYUQ X-Received: by 2002:a17:902:e5d2:b0:1a6:5487:3f97 with SMTP id u18-20020a170902e5d200b001a654873f97mr7039818plf.64.1682705570955; Fri, 28 Apr 2023 11:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682705570; cv=none; d=google.com; s=arc-20160816; b=aNn/3KF3QFhdgcTiWt0LgHs32S/wga0VJwQSzzFBr3pdf4sEMEw600MDEbW/6wzHeB K88zmAkmxv7PTlu46ZZhal40l0R/4YJL7S94xsjjpQHRFUzv+8PrDg+0HHhABOTjLPjP OWNDDfHlDvqK/WEK1t7NSPlzpI20bDBm2jWvFatGASJdVtf5mcVqB9X42yQ/TSVab31i 7pz9wL4ANtT3xURyhrwzI9/1aTvwCTI8e13P+SkYb9W3329MvHmkYcmVfeYGvWvGl5Uo fqkMr2KcjCtZs0oY67g/d3LHaysHQAmrCK3PJVO2/yVRfjYXDJqVPPayLNou3L3mGlVY sI2Q== 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=dPe++gR8ajfFvBqxUYCq1qpOkyGlpzm544PwXiUsXuo=; b=McfBrZDDVC4Ei/FY/cuxB/sTomUyaMGfR3JRpALKgZrrz7AlrhjFTTE7emHbxnazJa NWumNi8Ki/0JspsgrUhkNADA0MnVoREzpB10+lQfv3aLg8/QiyZNXUXFz58za6mF4YPK yAYOPy3CfKTNz9cNtv4g3e6vykaOwDeP5vKwNIOxCKfMSkM9uEZKZQwYJ7FfRm4OJVYR RbU1xVciFS24tcT/L1N3AeP/aMPg0CvJym23oor/qYk3zTT6QHagXIaOiet76p5xA2Eh KtyteKIJTqK5OrejLwB02geyxbwFsFsT2AwL3I81EZmpRGlOGeqpQKsT0ByuvB/FP9oO 3Iew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f9aX+70w; 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 d14-20020a170902cece00b001a1abd9a0a1si16542411plg.313.2023.04.28.11.12.24; Fri, 28 Apr 2023 11:12:50 -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=f9aX+70w; 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 S229646AbjD1R6A (ORCPT + 99 others); Fri, 28 Apr 2023 13:58:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjD1R57 (ORCPT ); Fri, 28 Apr 2023 13:57:59 -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 80FB71FDB for ; Fri, 28 Apr 2023 10:57:58 -0700 (PDT) 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 0E575638AC for ; Fri, 28 Apr 2023 17:57:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A993C433EF; Fri, 28 Apr 2023 17:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682704677; bh=vUy6/4Ph9HknFEtxqJzNk7RhxwSAEm4obtBT4GtISWo=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=f9aX+70wjGG2AZ8BLb0sezqpB05hL+ZC2Oq5XZm9/GZTFvUK3Kg2rrYZ6maEjahWK TQy3sD3CSLAU080GrMrHLQZ3PH6k3z1tVg5GXo940bKJNrxZIfMKWoXzMh0eRw1grQ HY48Xh5BV63MFagZ195P+9WWS/yQ2bJ0bqQHBsHk2RWVQkuWenrFepGafjvzQ8mhmU M5YHst14ZcE6HTcf0UrqR5kIzQoVHESJKkjRwSOSDXVsXE7MLnVUrxxtoJ5rloiQWD 3KBpopDFXdNtap0EFAxtb5Op4YHww3m++epK4z2rQqMneyB5MOdxNspSLZ2AzAjbiH uba4L/M9EMb4g== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id EBF8315404E8; Fri, 28 Apr 2023 10:57:56 -0700 (PDT) Date: Fri, 28 Apr 2023 10:57:56 -0700 From: "Paul E. McKenney" To: Imran Khan Cc: peterz@infradead.org, jgross@suse.com, vschneid@redhat.com, yury.norov@gmail.com, tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/2] smp: Reduce logging due to dump_stack of CSD waiters. Message-ID: <088edfa0-c1b7-407f-8b20-caf0fecfbb79@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20230428170006.1241472-1-imran.f.khan@oracle.com> <20230428170006.1241472-2-imran.f.khan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230428170006.1241472-2-imran.f.khan@oracle.com> X-Spam-Status: No, score=-4.6 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,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 On Sat, Apr 29, 2023 at 03:00:05AM +1000, Imran Khan wrote: > If a waiter is waiting for CSD lock, its call stack will not change > between first and subsequent hang detection for the same CSD lock. > So dump_stack for the waiter only for first time detection. > > This avoids excessive logging on large scale systems(with hundreds > of CPUs) where repetitive dump_stack from hundreds of CPUs can flood > the console. > > Signed-off-by: Imran Khan Reviewed-by: Paul E. McKenney > --- > kernel/smp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/smp.c b/kernel/smp.c > index ab3e5dad6cfe9..b7ccba677a0a0 100644 > --- a/kernel/smp.c > +++ b/kernel/smp.c > @@ -248,7 +248,8 @@ static bool csd_lock_wait_toolong(struct __call_single_data *csd, u64 ts0, u64 * > arch_send_call_function_single_ipi(cpu); > } > } > - dump_stack(); > + if (firsttime) > + dump_stack(); > *ts1 = ts2; > > return false; > -- > 2.34.1 >