[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87lee0dbmi.ffs@tglx>
Date: Thu, 24 Aug 2023 11:37:41 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Huacai Chen <chenhuacai@...ngson.cn>,
"Paul E . McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
Joel Fernandes <joel@...lfernandes.org>,
Josh Triplett <josh@...htriplett.org>,
Boqun Feng <boqun.feng@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Zqiang <qiang.zhang1211@...il.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
chenhuacai@...nel.org, rcu@...r.kernel.org,
linux-kernel@...r.kernel.org, Huacai Chen <chenhuacai@...ngson.cn>,
stable@...r.kernel.org, Binbin Zhou <zhoubinbin@...ngson.cn>
Subject: Re: [PATCH V3] rcu: Update jiffies locally in rcu_cpu_stall_reset()
On Tue, Aug 22 2023 at 12:02, Huacai Chen wrote:
> + * This function may be called in NMI context, so we cannot use ktime_get_ns()
> + * and ktime_get_coarse_ns(). Instead, we use their inaccurate but safe friends
> + * ktime_get_mono_fast_ns() and ktime_get_seconds() which will cause rcu_state.
> + * jiffies_stall to be a little large than expected (harmless and safer).
What's inaccurate about ktime_get_mono_fast_ns()? Bogus comments are
even worse than no comments.
> */
> void rcu_cpu_stall_reset(void)
> {
> + u64 curr, last, delta;
> +
> + curr = ktime_get_mono_fast_ns();
> + last = ktime_get_seconds() * NSEC_PER_SEC;
So this will trigger a warning when someone debugs suspend with KGDB.
It seems the approach taken here seems to be to throw stuff at the wall
and see what sticks.
Thanks,
tglx
Powered by blists - more mailing lists