[RFD 07/17] xfs: separate inode chunk freeing from inode freeing

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

 



From: Dave Chinner <dchinner@xxxxxxxxxx>

Currenetly inode chunk freeing is done when the last inode in the
inode chunk is marked as free. This results in immediate inode chunk
removal, which for some workloads is not desirable as they allocate
more inodes almost immediately (e.g. workloads with lots of
temporary or short-term files).

There are other reasons this behaviour is undesirable - if we are
allocating inode chunks in regions of stripe units or larger, we
don't want to punch holes in the middle of the inode regions as
inodes are freed - we want to keep the contiguous until we can free
them an entire stripe unit at a time. This minimises the free space
fragmentation that inode chunk removal can cause, and also prevents
interleaving of inode chunks with other data and/or metadata over
time.

Hence we should separate the inode chunk freeing from indvidual
inode freeing. The process is similar to the separation of the inode
chunk allocation - the first step is to separate out the inode btree
transaction and log reservation from the "inactive" transaction so
we can run a separate transaction after the inactive transaction has
been committed to free the inode chunk.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 fs/xfs/xfs_trans.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index f469e72..4c80c84 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -110,7 +110,8 @@ typedef struct xfs_trans_header {
 #define	XFS_TRANS_CHECKPOINT		42
 #define	XFS_TRANS_ICREATE		43
 #define	XFS_TRANS_IALLOC_CHUNK		44
-#define	XFS_TRANS_TYPE_MAX		44
+#define	XFS_TRANS_IFREE_CHUNK		45
+#define	XFS_TRANS_TYPE_MAX		45
 /* new transaction types need to be reflected in xfs_logprint(8) */
 
 #define XFS_TRANS_TYPES \
-- 
1.8.3.2

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




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux