Thread (7 messages) 7 messages, 3 authors, 2024-08-23

Re: [RESEND PATCH] cred: separate the refcount from frequently read fields

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2024-08-23 00:06:03
Also in: lkml

On Thu, 22 Aug 2024 at 21:15, Mateusz Guzik [off-list ref] wrote:
The refcount shares the cacheline with uid, gid and other frequently
read fields.
So moving the refcount around looks sensible, but I don't see why you
moved 'non_rcu' away from the rcu head union.

Isn't 'non_rcu' accessed exactly when the refcount is accessed too? So
putting it in the same cacheline with ->usage would seem to make
sense, and you literally moved the RCU head there.

Why not move it as a union, and keep the non-rcu bit with the RCU head?

Yes, it is rarely actually written to and as such can be "mostly
read-only", but since it is both read and written next to refcounts,
why do that?

Did I miss some common use?

               Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help