]> Gentwo Git Trees - linux/.git/commit
xfs: avoid busy loops in GCD
authorChristoph Hellwig <hch@lst.de>
Wed, 15 Oct 2025 06:29:30 +0000 (15:29 +0900)
committerCarlos Maiolino <cem@kernel.org>
Tue, 21 Oct 2025 09:32:50 +0000 (11:32 +0200)
commita8c861f401b4b2f8feda282abff929fa91c1f73a
tree1ed9b6900ce653c40d6e2a4a47cc79556e0e814f
parentf5caeb3689ea2d8a8c0790d9eea68b63e8f15496
xfs: avoid busy loops in GCD

When GCD has no new work to handle, but read, write or reset commands
are outstanding, it currently busy loops, which is a bit suboptimal,
and can lead to softlockup warnings in case of stuck commands.

Change the code so that the task state is only set to running when work
is performed, which looks a bit tricky due to the design of the
reading/writing/resetting lists that contain both in-flight and finished
commands.

Fixes: 080d01c41d44 ("xfs: implement zoned garbage collection")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_zone_gc.c