lkml.org 
[lkml]   [2023]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rcu: use try_cmpxchg in check_cpu_stall
On Wed, 1 Mar 2023 12:08:20 -0800
"Paul E. McKenney" <paulmck@kernel.org> wrote:

> > Attached patch implements this suggestion.
>
> Please help me out here.
>
> Why on earth are we even discussing making this change to code that
> normally never executes? Performance is not a consideration here.
>
> What am I missing here? Is there some sort of forward-progress
> issue that this change addresses?

Well, we sorta hijacked this thread. It turned into a more general
discussion, as there is code that this change will be useful for
(ring_buffer.c), but we just happen to be having the discussion here.

Where it will at most remove some text and give you back a few extra bytes
of memory ;-)

But if we do use cmpxchg_success() IMHO, it does improve readability.

> - cmpxchg(&rcu_state.jiffies_stall, js, jn) == js) {
> + cmpxchg_success(&rcu_state.jiffies_stall, js, jn)) {

-- Steve

\
 
 \ /
  Last update: 2023-03-27 00:41    [W:2.109 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site