public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] xfs: shrink the xfs_icdinode
@ 2016-01-14  6:09 Dave Chinner
  2016-01-14  6:09 ` [PATCH 1/8] xfs: introduce inode log format object Dave Chinner
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Dave Chinner @ 2016-01-14  6:09 UTC (permalink / raw)
  To: xfs

Hi folks,

This is a followup to the original RFC patchset posted here:

http://oss.sgi.com/archives/xfs/2016-01/msg00366.html

This patchset actually works, and passes through xfstests without
any regressions at all. So feel free to test and comment on this
version.

-Dave.

Version 2
- timestamps are signed, so need casting to int before being stored
  in a 64 bit variable when read from disk. Fixes generic/258
  failure (patch 2).
- nlink wasn't being accounted correctly for O_TMPFILE files and
  rename whiteouts. Fixes generic/078 and others. (patch 5)
- VFS does not initialise i_mode, ever, so we need to initialise it
  directly after slab allocation to ensure that we correctly detect
  new file creates and hence don't add the inode the sb list twice,
  corrupting it. (busy inodes after unmount, self destruct in 5
  seconds, have a nice day!) (patch 8)
- when reallocating a reclaimable inode, we need to save the
  variables that hold on-disk values across the inode_init_always()
  call, otherwise we lose them. This results in corruption of these
  fields. (patch 8)

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [RFC PATCH 0/8] xfs: shrink the struct xfs_icdinode
@ 2016-01-12  9:01 Dave Chinner
  2016-01-12  9:01 ` [PATCH 3/8] xfs; cull unnecessary icdinode fields Dave Chinner
  0 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2016-01-12  9:01 UTC (permalink / raw)
  To: xfs

Hi folks,

This is a patchset I've written over the past couple of afternoons.
It smokes badly if you try to run it, so I'm posting this for early
feedback, not for testing and bug reports.

Despite it's name, the struct xfs_icdinode is an on-disk structure -
it gets copied directly to the log, and so we are kind of stuck with
keeping it around and all it's duplicate information while we do
this. Hence before we can shrink this structure, wehave ot break
it's link with the logging code.

That's what the first patch does - it introduces a struct
xfs_log_dinode, and the log formatting and reocvery code use that
for the structure that is placed physically in the log. We marshall
the variables from the xfs_icdinode in and out individually so we
break the dependence between the on-disk format and the
xfs_icdinode.

This now enables us to remove all the bits of the xfs_icdinode that
are either unused (e.g. padding), only used to support old formats,
or a duplicates with information stored in the VFS struct inode. As
a result, I've been able to reduce the xfs_icdinode from 176 bytes
down to:

        /* size: 72, cachelines: 2, members: 19 */
        /* sum members: 68, holes: 1, sum holes: 4 */

72 bytes. This means it takes 104 bytes off the size of the struct
xfs_inode, which a 12% reduction in size. This will be a massive win
for systems that cache lots of inodes!

I have not yet addressed the di_uid or the di_gid because I haven't
had time to look into the user namespace conversion issues that I'll
have to handle correctly to use the VFS inode fieldsr. I think
I can also pull up the di_nblocks field to the VFS inode as well. If
I manage this, I will reduce the xfs_icdinode by another 16 bytes.

With this change made, the xfs_icdinode is no long an "in core disk
inode" so I'm wondering whether I should rename it or simply make it
go away altogether and pull the remaining fields straight into the
struct xfs_inode. Any thoughts on new names and/or getting rid of it
woul dbe appreciated.

Some of the code is pretty raw - I haven't cleaned it up at all, so
do be surprised if there's things I've missed or changed in the
wrong patch, etc.

Comments, thoughts, flames, all welcome!

-Dave.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-01-25 18:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-14  6:09 [PATCH v2 0/8] xfs: shrink the xfs_icdinode Dave Chinner
2016-01-14  6:09 ` [PATCH 1/8] xfs: introduce inode log format object Dave Chinner
2016-01-25 15:43   ` Brian Foster
2016-01-14  6:09 ` [PATCH 2/8] xfs: remove timestamps from incore inode Dave Chinner
2016-01-25 15:43   ` Brian Foster
2016-01-14  6:09 ` [PATCH 3/8] xfs; cull unnecessary icdinode fields Dave Chinner
2016-01-25 15:43   ` Brian Foster
2016-01-14  6:09 ` [PATCH 4/8] xfs: move v1 inode conversion to xfs_inode_from_disk Dave Chinner
2016-01-25 15:43   ` Brian Foster
2016-01-14  6:09 ` [PATCH 5/8] xfs: use vfs inode nlink field everywhere Dave Chinner
2016-01-25 18:25   ` Brian Foster
2016-01-14  6:09 ` [PATCH 6/8] xfs: move inode generation count to VFS inode Dave Chinner
2016-01-25 18:25   ` Brian Foster
2016-01-14  6:09 ` [PATCH 7/8] xfs: move di_changecount " Dave Chinner
2016-01-25 18:25   ` Brian Foster
2016-01-14  6:09 ` [PATCH 8/8] xfs: mode di_mode to vfs inode Dave Chinner
2016-01-25 18:25   ` Brian Foster
  -- strict thread matches above, loose matches on Subject: below --
2016-01-12  9:01 [RFC PATCH 0/8] xfs: shrink the struct xfs_icdinode Dave Chinner
2016-01-12  9:01 ` [PATCH 3/8] xfs; cull unnecessary icdinode fields Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox