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 ABBA6C27C40 for ; Thu, 24 Aug 2023 09:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238607AbjHXJjl (ORCPT ); Thu, 24 Aug 2023 05:39:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240850AbjHXJj0 (ORCPT ); Thu, 24 Aug 2023 05:39:26 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 973AE10F9; Thu, 24 Aug 2023 02:39:19 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1692869958; 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=DvZfmm7zgSnDofgwBuPopLomuztY6pWf7tnJiRvMuNg=; b=hqkhO1uDufRG29MhSHWx7hYZ1RKyxc6JAxR/q7qXqEseZ7scy6y1COWYr/Rx1Iws88d73V Lw++X5SBKRO/0g6klh78kpoc3HPZhNN5MoFZoDlC5Cy/0pLHh54o5iDHvt1EmxZBHRSYcd lZp9U22dLDzUxiHdZSJPvlTA3ej8EwklW/vK1twrk6gTS8yCeQDbJSFO4BND6CjxNaXJf1 uiNMBd28TGYv/JrZQQZYnnKePP0S3XYFC6rOPJcrHiLLd0ebEzZAbqR5wBGMUB3jLfSNCn l/Jn+//Ouuj6CvOE999RzKJT8e/IF8mQDRqGdMul+fKPnktl/Z6fm4vBvl50Xg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1692869958; 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=DvZfmm7zgSnDofgwBuPopLomuztY6pWf7tnJiRvMuNg=; b=rt2aVqOB0gufNxOlvRu4UVYC5NmgzM/auhxiR05esYVcjgp/WTOdsOT+S8UjQydUxU6U2E m5aD7rNm5Wysd6Bw== To: Huacai Chen Cc: Joel Fernandes , Z qiang , paulmck@kernel.org, Huacai Chen , Frederic Weisbecker , Neeraj Upadhyay , 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: <5777BD82-2C8D-4BAB-BDD3-C2C003DC57FB@joelfernandes.org> <87ttspct76.ffs@tglx> Date: Thu, 24 Aug 2023 11:39:18 +0200 Message-ID: <87il94dbjt.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: linux-kernel@vger.kernel.org On Thu, Aug 24 2023 at 10:47, Huacai Chen wrote: > On Thu, Aug 24, 2023 at 6:03=E2=80=AFAM Thomas Gleixner wrote: >> +unsigned long tick_estimate_stale_jiffies(void) >> +{ >> + ktime_t delta =3D ktime_get_mono_fast_ns() - READ_ONCE(last_jiff= ies_update); >> + >> + return delta < 0 ? 0 : div_s64(delta, TICK_NSEC); >> +} >> + >> /* >> * Must be called with interrupts disabled ! >> */ > Thank you for your advice, now the latest proposal is here [1], this > is very similar to your diff, please take a look. Similar by some definition of similar.