Re: [PATCH 1/2] xfs: reorder xfs_inode structure elements to remove unneeded padding.

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

 



On Tue, Jun 18, 2024 at 12:40:23PM -0400, JunChao Sun wrote:
> Darrick J. Wong <djwong@xxxxxxxxxx> 于2024年6月18日周二 12:23写道:
> >
> > On Tue, Jun 18, 2024 at 07:35:04PM +0800, Junchao Sun wrote:
> > > By reordering the elements in the xfs_inode structure, we can
> > > reduce the padding needed on an x86_64 system by 8 bytes.
> >
> >
> > > Does this result in denser packing of xfs_inode objects in the slab
> > > page?
> 
> No. Before applying the patch, the size of xfs_inode is 1800 bytes
> with my config, and after applying the patch, the size is 1792 bytes.
> This slight reduction does not result in a denser packing of xfs_inode
> objects within a single page.

The "config dependent" part of this is important though.  On my
laptop running Debian 6.6.15-amd64, xfs_inode is exactly 1024 bytes,
and slab chooses to allocate 32 of them from an order-3 slab.

Your config gets you 18 from an order-3 slab, and you'd need to get
it down to 1724 (probably 1720 bytes due to alignment) to get 19
from an order-3 slab.  I bet you have lockdep or something on.




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux