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 3D5DFC7EE2C for ; Wed, 23 Aug 2023 21:37:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238088AbjHWVgy (ORCPT ); Wed, 23 Aug 2023 17:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238348AbjHWVgr (ORCPT ); Wed, 23 Aug 2023 17:36:47 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66F49CEE; Wed, 23 Aug 2023 14:36:46 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1692826605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rtsxkwGtRkAmOuDbF4foPUA+AgAwg49723n1s+jEHk0=; b=tBvQH3iWzoLnJl5d6KXcCRwbsT5gP7zMmgb9l+7f84HhvkCymIyY1rqEWTux8uShn075vs GzXa8KUY3nNbOyV+iajEina6MhS2VEnb8GSYg63cjGfcr/lNXkcPN/6GZpAPdCg+2H22Be olmM0m9Rk7Tg4D399QC9Vv71tfxJaYyYPmIvGBDyCMoFkfb3ducV3wtEIE4Rc/wYWzyVor LSx5rU5C11tI/tbzVoBnP6YFGoXtit4Aa7VgU6ZvewBRmyLmXavN4Yx9Qs37GCan3zCADw aOHyTm1X13UzPA5sWsoHycH3DA+tLZIyESFnsncTrYHmphRPlkv1D9Zg0TxUrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1692826605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rtsxkwGtRkAmOuDbF4foPUA+AgAwg49723n1s+jEHk0=; b=XTMqosZGH4WzSVs1ls3ih8XgKu25/HPqldJMApBQYV1KTgZC02V9vUfOm3SXrhS+MFl0V6 js2D5Z3Ac0G8N0BA== To: Z qiang , Huacai Chen Cc: paulmck@kernel.org, Huacai Chen , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Ingo Molnar , John Stultz , Stephen Boyd , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Sergey Senozhatsky , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Binbin Zhou Subject: Re: [PATCH V4 2/2] rcu: Update jiffies in rcu_cpu_stall_reset() In-Reply-To: References: <20230814020045.51950-1-chenhuacai@loongson.cn> <20230814020045.51950-2-chenhuacai@loongson.cn> <18b9119c-cbc8-42a1-a313-9154d73c9841@paulmck-laptop> Date: Wed, 23 Aug 2023 23:36:44 +0200 Message-ID: <87zg2hcufn.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Aug 16 2023 at 18:06, Z. qiang wrote: >> On Wed, Aug 16, 2023 at 1:09=E2=80=AFPM Z qiang wrote: >> > You can replace rcu_state.jiffies_stall update by setting rcu_cpu_stal= l_suppress >> > in rcu_cpu_stall_reset(), and reset rcu_cpu_stall_suppress in rcu_gp_= init() and >> > rcu_gp_cleanup(). >> What's the advantage compared with updating jiffies? Updating jiffies >> seems more straight forward. >> > > In do_update_jiffies_64(), need to acquire jiffies_lock raw spinlock, > like you said, kgdb is not the only caller of rcu_cpu_stall_reset(), > the rcu_cpu_stall_reset() maybe invoke in NMI (arch/x86/platform/uv/uv_n= mi.c) What's worse is that KGDB can set breakpoints pretty much everywhere and there is no guarantee that the jiffies lock is not held when a breakpoint hits. Thanks, tglx