Re: [for-linus][PATCH 1/3] eventfs: Have the inodes all for files and directories all be the same

From: Steven Rostedt
Date: Mon Jan 22 2024 - 14:59:01 EST


On Mon, 22 Jan 2024 13:35:43 -0500
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:

> > When an inode is no longer referenced, it is freed. When it is referenced
> > again, I want it to be recreated with the same inode number it had
> > previously. How would having a bitmask help with that? I need a way to map
> > an ei structure with a unique number without adding another 4 bytes to the
> > structure itself.
>
> As discussed in a separate exchange with Linus, why do you care so much about
> not adding a 4 bytes field to the structure ?

I'm trying to keep the memory overhead of tracing down as much as possible.
4 bytes for 2000 events (and growing) just adds to the memory footprint of
tracing.

And an eventfs_inode is the link between control of an event per instance.
Thus, it may only be 8k for those 2000 events, but that's another 8k for
each instance you use. You make 10 instances, that is now 80k.

This is used in embedded systems as well, so every byte counts.

But as Linus pointed out, the issue is moot, as the structure ends with a
single 32bit int. And on 64 bit machines, there's likely a 4 byte hole that
we can use there.

-- Steve