Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp260835rdb; Tue, 31 Oct 2023 06:57:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvfr4Bj1DEZFhSiNT5MvcxQFhEJpvLRfYGZcJQXrs8bOnQ44yy2luYxOKxd5iloT2zjL/i X-Received: by 2002:a05:6a00:2da4:b0:68f:fa05:b77a with SMTP id fb36-20020a056a002da400b0068ffa05b77amr11641534pfb.31.1698760662864; Tue, 31 Oct 2023 06:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698760662; cv=none; d=google.com; s=arc-20160816; b=xyVNxZGnjm0Cj8nX/wARkicFwL4+KpUjff0nUdANsEbgpRDEoELFHg4LghXrF+qMTa flbe3Wyq/FCPh0n+ZOp6+ibCDSVgeHuj5VBLS8xs40Sx16TO6ys23GBqWeRLQ2pfAXjI 4A56x9eViqQnOrfXbVxj4G/0ns+yRXsftQsE0tPKz+IXszXhjvUlXH3v93MyLuofno5s 7+Tv/aUPlNdxRJyfunrlpKQ8zOChk8OXUUOBgFkbudneH04/3E2fDgvxGIY0oSJiZG8o ic08wMlSGKMZdIJLf5V3OXVMDAB98qz9SFzrDR31q2g2hJG6hdsvUpLYk7CACB0nsx9r ZzkA== 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=+MIoLWEUges1r6s4PjT7Kgzjeq6Vw7b4Ks9ViXzBtOg=; fh=ksTnCw9vOJhKAu7IYPcAvgm9Q/JJ3PNl+1OssYCg/hQ=; b=Ipv/8CyQmnYw1ixOafq4e//0YQZ+2svkn+oDiXaSgCRrEC9SetBr6lZfW/tx3UNlnU 94gCoVe6xLzwz2MKmiNGB04566SDn1J+Tob7pRioxL5VWsg8Ls2GhSCj68Rb+w5WMjEh w1/1H+sDr7v/xBWceHmVPAD605zD2ddm/MqYBWuRPknthudKjEGfERlfQvgycWaeEQnJ ZSkYc7GPbviVKub3N5+UteNXcBfa6r2iU8qRXX3507nc/+Zyj2vk5zidsbK3n6pAvUm2 Nh4457FqJBOmZcxDLqUnMzoQMB09SUTVZCTe/mZfDe+3V1rZ4gDaSY1JLevLbs+NSNrx 2EZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AYQ2bO43; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id r29-20020aa7963d000000b00690d55d630dsi1006876pfg.274.2023.10.31.06.57.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 06:57:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AYQ2bO43; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 19B8B8068FD4; Tue, 31 Oct 2023 06:57:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344700AbjJaN5d (ORCPT + 99 others); Tue, 31 Oct 2023 09:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344672AbjJaN5b (ORCPT ); Tue, 31 Oct 2023 09:57:31 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36BF2DE; Tue, 31 Oct 2023 06:57:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1B88C433C7; Tue, 31 Oct 2023 13:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698760648; bh=xMTjHScFFr2o8yuO0RmPKlhSKjlfiKYQxGGNU/+pEpQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=AYQ2bO43RzIXzw5nz9+nLznLxr9eZ8732uxOGuXAYY6La2DQ8HpYN8gNe37GLxNHe jqWVME/XGDIJ3XFx49te6k0v99e4lynsaQJcBUMKazQ+TbUo54dNAUl3giJXH5uUaH tIHc0QxmP9Sj9hGUSC77IZoFAbuGVRVduWWdqjYqbTDBVIBxmMH1Gaf9gnusHYW2ue rm6hsZTu1t8z6WXEHM1WV53mJqDnDbMV41PmDvzfcVAJZwleC7Uh9514KgDH5j8lP7 BVlmSIHuFeRsLVlhyD1eHd0ftgpVu7sFjYBIqLLYF8dKWYxLlZyKfF9Imv3Rz76X57 c9jqQ5y2v5WpA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 58C05CE086F; Tue, 31 Oct 2023 06:57:28 -0700 (PDT) Date: Tue, 31 Oct 2023 06:57:28 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , rcu@vger.kernel.org, Boqun Feng , Joel Fernandes , Neeraj Upadhyay , Uladzislau Rezki , Z qiang Subject: Re: [GIT PULL] RCU changes for v6.7 Message-ID: <78b18304-c6a5-4ea1-a603-8c8f1d79cc1a@paulmck-laptop> Reply-To: paulmck@kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 31 Oct 2023 06:57:40 -0700 (PDT) On Tue, Oct 31, 2023 at 11:19:01AM +0100, Frederic Weisbecker wrote: > On Mon, Oct 30, 2023 at 06:12:51PM -1000, Linus Torvalds wrote: > > On Fri, 27 Oct 2023 at 01:33, Frederic Weisbecker wrote: > > > > > > rcu/stall: Stall detection updates. Introduce RCU CPU Stall notifiers > > > that allows a subsystem to provide informations to help debugging. > > > Also cure some false positive stalls. > > > > I absolutely detest this stall notifier thing. > > > > Putting the stall notifier before the stall message does not "help > > debugging". Quite the reverse. It ends up being a lovely way to make > > sure that the debug message is never printed, because there's some > > entirely untested - and thus buggy - notifier on the chain before the > > printout from the actual stall code. > > > > I've pulled this, but I really want to voice my objection against > > these kinds of "debugging aids". I have personally spent way too many > > hours debugging a dead machine because some "debug aid" ended up being > > untested garbage. > > > > If you absolutely think that this is a worthy and useful thing to do, > > then at the very least make sure that these "debug aids" will always > > come *after* the core output, and can't make things horrendously > > worse. > > > > But in general, think twice before adding "maybe somebody else wants > > to print debug info". Because unless you have a really really REALLY > > good reason for it, it's more likely to hurt than to help. > > > > Right now I see no users of this except for the rcu torture code, and > > it certainly doesn't seem hugely important there. And so I'm wondering > > what the actual real use-case would be. > > I see, one possibility is to revert this and switch to normal calls > for any future debug information to add from another subsystem. I'll > wait for Paul's opinion... The use case thus far is where the RCU CPU stall warning is due to locks being spun for or held for excessive periods of times, and then the called code prints out the relevant debug information. In this particular case, the RCU CPU stall warning message is just added noise. And if we were to print the RCU CPU stall warning first, we would likely disturb the locking state, thus rendering the corresponding debug information useless. But I completely agree that a poorly planned use of this facility would have all the problems that Linus has seen in the past. Would it help if we make rcu_stall_chain_notifier_register() print a suitably obnoxious message saying that future RCU CPU stall warnings might be unreliable? Thanx, Paul