Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-11] src
Module Name: src
Committed By: martin
Date: Sun Oct 19 09:41:05 UTC 2025
Modified Files:
src/sys/kern [netbsd-11]: subr_time.c subr_time_arith.c
src/tests/kernel [netbsd-11]: t_time_arith.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #57):
sys/kern/subr_time.c: revision 1.42
tests/kernel/t_time_arith.c: revision 1.4
tests/kernel/t_time_arith.c: revision 1.5
tests/kernel/t_time_arith.c: revision 1.6
tests/kernel/t_time_arith.c: revision 1.7
sys/kern/subr_time_arith.c: revision 1.4
sys/kern/subr_time_arith.c: revision 1.5
tvtohz(9): Add some automatic tests.
Preparation for:
PR kern/59691: tstohz(9) fails to round up on some inputs
tstohz(9): Add some automatic tests.
Move this from subr_time.c to subr_time_arith.c to facilitate them.
PR kern/59691: tstohz(9) fails to round up on some inputs
tstohz(9): Round up, not down.
This is used for timeouts, and it is bad if it returns a timeout that
is too short, particularly if it rounds `wait a little' to `don't
wait at all'.
This still has some substantial rounding errors, e.g. at hz=8191 with
a period of just over 122 085 ns, tstohz(122 084 ns) this returns 3
when it should return 2 because it rounds up to tvtohz(123 us) for
which 3 is the correct answer -- but at least it's still rounding up.
I'll leave those as xfail for now.
PR kern/59691: tstohz(9) fails to round up on some inputs
This was likely the underlying cause of various heartbeat panics
users have been seeing -- I hypothesize that for short timeouts that
reschedule themselves, the itimer callout would call itself in a loop
and never return from callout_softclock because of this rounding
down:
PR kern/59339: heartbeat watchdog fires since 10.99.14
PR kern/59465: Recurring kernel panic with -current (10.99.14):
"heart stopped beating"
PR kern/59679: Multiple "heart stopped beating" / "softints stuck for
16 seconds" panics
tstohz(9): Fix missing digit in three test cases.
Tripped on i386 testbed but not on amd64, and generally on LP32 but
not on LP64, because tvohz chooses branches differently depending on
LONG_MAX.
PR kern/59691: tstohz(9) fails to round up on some inputs
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/kern/subr_time.c
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/kern/subr_time_arith.c
cvs rdiff -u -r1.3 -r1.3.2.1 src/tests/kernel/t_time_arith.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index