diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-09-07 08:29:44 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-09-07 08:29:44 -0700 |
| commit | 6ab41fca2e8059803b27cef336d2abe7c936ba0b (patch) | |
| tree | 65b638880941dd6c4146d5bd74802ebd9c2bdc12 /kernel/time/vsyscall.c | |
| parent | b7369eb7319d0cb94ad2ea5b5486e276339c595a (diff) | |
| parent | 762af5a2aa0ad18da1316666dae30d369268d44c (diff) | |
| download | linux-6ab41fca2e8059803b27cef336d2abe7c936ba0b.tar.gz linux-6ab41fca2e8059803b27cef336d2abe7c936ba0b.tar.bz2 linux-6ab41fca2e8059803b27cef336d2abe7c936ba0b.zip | |
Merge tag 'timers-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Ingo Molnar:
"Fix a severe slowdown regression in the timer vDSO code related to the
while() loop in __iter_div_u64_rem(), when the AUX-clock is enabled"
* tag 'timers-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
vdso/vsyscall: Avoid slow division loop in auxiliary clock update
Diffstat (limited to 'kernel/time/vsyscall.c')
| -rw-r--r-- | kernel/time/vsyscall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/time/vsyscall.c b/kernel/time/vsyscall.c index 8ba8b0d8a387..aa59919b8f2c 100644 --- a/kernel/time/vsyscall.c +++ b/kernel/time/vsyscall.c @@ -159,10 +159,10 @@ void vdso_time_update_aux(struct timekeeper *tk) if (clock_mode != VDSO_CLOCKMODE_NONE) { fill_clock_configuration(vc, &tk->tkr_mono); - vdso_ts->sec = tk->xtime_sec; + vdso_ts->sec = tk->xtime_sec + tk->monotonic_to_aux.tv_sec; nsec = tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift; - nsec += tk->offs_aux; + nsec += tk->monotonic_to_aux.tv_nsec; vdso_ts->sec += __iter_div_u64_rem(nsec, NSEC_PER_SEC, &nsec); nsec = nsec << tk->tkr_mono.shift; vdso_ts->nsec = nsec; |
