[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230301212940.GH2948950@paulmck-ThinkPad-P17-Gen-1>
Date: Wed, 1 Mar 2023 13:29:40 -0800
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Uros Bizjak <ubizjak@...il.com>,
Joel Fernandes <joel@...lfernandes.org>, rcu@...r.kernel.org,
linux-kernel@...r.kernel.org,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
Josh Triplett <josh@...htriplett.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>
Subject: Re: [PATCH] rcu: use try_cmpxchg in check_cpu_stall
On Wed, Mar 01, 2023 at 03:46:41PM -0500, Steven Rostedt wrote:
> On Wed, 1 Mar 2023 12:36:45 -0800
> "Paul E. McKenney" <paulmck@...nel.org> wrote:
>
> > Some years down the road, should cmpxchg_success() be on the tip of
> > the tongue of every kernel hacker, perhaps. Or perhaps not.
>
> A bit of a catch-22 I would say. It will only become something everyone
> knows if it exists.
>
> > In the meantime, we have yet another abysmally documented atomic
>
> Is it?
Is sure is.
> > operation that is not well known throughout the community. And then the
> > people coming across this curse everyone who had anything to do with it,
> > as they search the source code, dig through assembly output, and so on
> > trying to work out exactly what this thing does.
> >
> > Sorry, but no way.
> >
> > Again, unless there is some sort of forward-progress argument or
> > similar convincing argument.
>
> Speaking of forward progress...
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/atomic_t.txt#n316
Yes, that is probably the best starting point.
And if you have been around long enough, you know that this is in fact
the best starting point. Plus if you can correctly interpret the words
in that document. And if you are familiar with the entire document.
But otherwise, good luck learning the semantics for something like
atomic_fetch_add_release().
> Anyway, I'm guessing this will not become part of rcu any time soon. But
> for the ring buffer, I would happily take it.
Certainly not unless someone comes up with a good reason for it.
Thanx, Paul
Powered by blists - more mailing lists