diff options
| author | Carlos Maiolino <[email protected]> | 2025-04-22 12:54:54 +0000 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-04-22 14:03:14 +0000 |
| commit | bd7c19331913b955a7823e6315ca16bbcc65aeff (patch) | |
| tree | 2b7f1d1f724161ac2233ea25d7d3159cfba8ed42 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | xfs: document zoned rt specifics in admin-guide (diff) | |
| download | kernel-bd7c19331913b955a7823e6315ca16bbcc65aeff.tar.gz kernel-bd7c19331913b955a7823e6315ca16bbcc65aeff.zip | |
XFS: fix zoned gc threshold math for 32-bit arches
xfs_zoned_need_gc makes use of mult_frac() to calculate the threshold
for triggering the zoned garbage collector, but, turns out mult_frac()
doesn't properly work with 64-bit data types and this caused build
failures on some 32-bit architectures.
Fix this by essentially open coding mult_frac() in a 64-bit friendly
way.
Notice we don't need to bother with counters underflow here because
xfs_estimate_freecounter() will always return a positive value, as it
leverages percpu_counter_read_positive to read such counters.
Fixes: 845abeb1f06a ("xfs: add tunable threshold parameter for triggering zone GC")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Carlos Maiolino <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hans Holmberg <[email protected]>
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
