summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorHans Holmberg <hans.holmberg@wdc.com>2026-10-05 13:59:17 +0200
committerCarlos Maiolino <cem@kernel.org>2026-10-06 10:23:20 +0200
commit197f678cccbaaf8a5f52a91e6fc914d4c57be7f7 (patch)
tree65016281e13193af3d35cdbffd392d1cbb2d43ed /tools/perf/scripts/python
parenta644af916cf14daba9a4fd6413565c7bd34b5bdc (diff)
downloadlinux-197f678cccbaaf8a5f52a91e6fc914d4c57be7f7.tar.gz
linux-197f678cccbaaf8a5f52a91e6fc914d4c57be7f7.zip
xfs: don't let racing writers consume the free zones reserved for GC
xfs_try_open_zone() checks the free zone count to avoid grabbing zones required for GC forward progress, but does so without decreasing the counter, letting multiple user writers through to call xfs_open_zone() and collectively gobble up all free zones, stalling gc and eventually leading to user threads getting stuck waiting for free space. Fold the check and the accounting into a single atomic claim in xfs_open_zone() instead. The free zone count is decremented before the zone is looked up and given back if none could be grabbed, so the reserve can no longer be raced away. User allocations only claim a zone if that leaves the reserve behind, while GC just needs one free zone and thus can still use the zones that are kept for it. Also add a warning if we end up not finding a free zone in the xarray, as this should never happen. Fixes: 4e4d52075577 ("xfs: add the zoned space allocator") Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions