Thread (43 messages) 43 messages, 4 authors, 2024-01-31

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2024-01-30 23:06:32
Also in: lkml

On Tue, 30 Jan 2024 at 14:56, Linus Torvalds
[off-list ref] wrote:
With that, the base size of 'struct eventfs_inode' actually becomes 96
bytes for me.
It can be shrunk some more.

The field ordering is suboptimal. Pointers are 8 bytes and 8-byte
aligned, but 'struct kref' is just 4 bytes, and 'struct eventfs_attr'
is 12 bytes and 4-byte aligned.

So if you pack all the 8-byte-aligned fields at the beginning, and the
4-byte-aligned ones at the end, you get 88 bytes.

At which point a name pointer would *just* fit in 96 bytes.

...  and then some debug option is enabled, and it all goes to hell again.

              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