]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: improve handling of busy extents in the low-level allocator
authorChristoph Hellwig <hch@lst.de>
Tue, 7 Feb 2017 22:06:57 +0000 (14:06 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 9 Feb 2017 18:50:25 +0000 (10:50 -0800)
commit52be841a77021a85d82d152d95892ec98e8774bd
treefd88d14b7765f0834273807a14ee931519029438
parent955e0cd6e3907dbe1dd2f15f24236305b7496fac
xfs: improve handling of busy extents in the low-level allocator

Currently we force the log and simply try again if we hit a busy extent,
but especially with online discard enabled it might take a while after
the log force for the busy extents to disappear, and we might have
already completed our second pass.

So instead we add a new waitqueue and a generation counter to the pag
structure so that we can do wakeups once we've removed busy extents,
and we replace the single retry with an unconditional one - after
all we hold the AGF buffer lock, so no other allocations or frees
can be racing with us in this AG.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/xfs_extent_busy.c
fs/xfs/xfs_extent_busy.h
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h