aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorThomas Weißschuh <[email protected]>2025-08-25 13:26:35 +0000
committerThomas Gleixner <[email protected]>2025-09-03 09:55:11 +0000
commit762af5a2aa0ad18da1316666dae30d369268d44c (patch)
tree3e8d9d5856483062cb11eca04aa063cbb0a09491 /fs/btrfs/compression.c
parentLinux 6.17-rc4 (diff)
downloadkernel-762af5a2aa0ad18da1316666dae30d369268d44c.tar.gz
kernel-762af5a2aa0ad18da1316666dae30d369268d44c.zip
vdso/vsyscall: Avoid slow division loop in auxiliary clock update
The call to __iter_div_u64_rem() in vdso_time_update_aux() is a wrapper around subtraction. It cannot be used to divide large numbers, as that introduces long, computationally expensive delays. A regular u64 division is also not possible in the timekeeper update path as it can be too slow. Instead of splitting the ktime_t offset into into second and subsecond components during the timekeeper update fast-path, do it together with the adjustment of tk->offs_aux in the slow-path. Equivalent to the handling of offs_boot and monotonic_to_boot. Reuse the storage of monotonic_to_boot for the new field, as it is not used by auxiliary timekeepers. Fixes: 380b84e168e5 ("vdso/vsyscall: Update auxiliary clock data in the datapage") Reported-by: Miroslav Lichvar <[email protected]> Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected] Closes: https://lore.kernel.org/lkml/aKwsNNWsHJg8IKzj@localhost/
Diffstat (limited to 'fs/btrfs/compression.c')
0 files changed, 0 insertions, 0 deletions