Commit 62e44e4
committed
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 inputs1 parent 93c906c commit 62e44e4
File tree
3 files changed
+783
-22
lines changed- sys/kern
- tests/kernel
3 files changed
+783
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 87 | | |
104 | 88 | | |
105 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
158 | 186 | | |
159 | 187 | | |
160 | 188 | | |
| |||
0 commit comments