Re: [PATCH 6/7] ovl: deduplicate lowerpath and lowerstack[0]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 26, 2023 at 3:07 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Sat, 8 Apr 2023 at 18:43, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> >
> > For the common case of single lower layer, embed ovl_entry with a
> > single lower path in ovl_inode, so no stack allocation is needed.
>
> This makes ovl_inode grow by 8 bytes, right?

I can get rid of those extra bytes by stashing __numlower
inside the union with the LSB set to indicate an external stack.

> That's a win only in the numlower = 1 case,

That's a *very* common case (i.e. non-dir without lowerdata inode)

> in the other cases it's a net loss, so it might not
> be worth it even without the added complexity.
>

I guess this is an optimization that should be justified with a benchmark.
I'll drop it for now.

Thanks,
Amir.




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux