lkml.org 
[lkml]   [2023]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch 2/3] atomics: Provide rcuref - scalable reference counting
On Wed, Mar 1, 2023 at 5:05 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> The result of staring more is:
>
> get():
> 6b57: f0 41 83 45 40 01 lock addl $0x1,0x40(%r13)
> 6b5d: 0f 88 cd 00 00 00 js 6c30 // -> slowpath if negative

[ rest removed ]

Yeah, so this looks like I was hoping for.

That PREEMPT=y case of 'put() makes me slightly unhappy, and I'm
wondering if it can be improved with better placement of the
preempt_disable/enable, but apart from maybe some massaging to that I
don't see a good way to avoid it.

And the ugliness is mostly about the preemption side, not about the
refcount itself. I've looked at that "preempt_enable ->
preempt_schedule" code generation before, and I've disliked it before,
and I don't have an answer to it.

> but the actual network code does some sanity checking:

Ok. Not pretty. But at least it's just an xadd on the access itself,
there's just some extra noise around it.

Linus

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