[RFD 16/17] xfs: add in-core unlinked list for v3 inodes

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

 



From: Dave Chinner <dchinner@xxxxxxxxxx>

The first step in optimising unlinked list processing for v3 inodes
is to avoid having to walk the inode buffers to find the next inode
in the list. By definition, inodes on the unlinked list must be in
the inode cache and so we can add a set of incore hash lists to the
struct xfs_perag that match the on disk structure.

This allows us to use in-core locks rather than buffer locks to
provide exclusion for walking and manipulating the list. It also
allows us to use double linked lists so we don't need to walk the
list to find the adjacent inode on the list that needs to be
modified when we remove an inode from the unlinked list.

Further, it allows us to keep track of the tail of the unlinked list
so we can add inodes to the tail of the list instead of the head.
The combination of incore locking and adding inodes to the tail of
the unlinked lists means we can avoid locking the AGI during
additions to the unlinked list (execpt when the list is empty),
meaning we can execute concurrent list modifications safely when the
AGI itself doesn't need direct modification as part of the
operation.  This removes a significant serialisation point from the
unlink(2) path.

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

diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h
index c423191..17f7d43 100644
--- a/fs/xfs/xfs_ag.h
+++ b/fs/xfs/xfs_ag.h
@@ -235,6 +235,8 @@ typedef struct xfs_agfl {
  */
 #define XFS_PAGB_NUM_SLOTS	128
 
+struct xfs_iunlink_list;
+
 typedef struct xfs_perag {
 	struct xfs_mount *pag_mount;	/* owner filesystem */
 	xfs_agnumber_t	pag_agno;	/* AG this structure belongs to */
-- 
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