<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/sys/kern/kern_heartbeat.c, branch trunk</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>curcpu_stable(9): New function for asserting curcpu() is stable.</title>
<updated>2023-07-08T13:59:05+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-07-08T13:59:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=81aaded24099f3685918bea8bbfc0fa5d60ab781'/>
<id>81aaded24099f3685918bea8bbfc0fa5d60ab781</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>heartbeat(9): Test whether curcpu is stable, not kpreempt_disabled.</title>
<updated>2023-07-07T17:05:13+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-07-07T17:05:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=afa0f868fead1cc486bacdbb818c375a027680d5'/>
<id>afa0f868fead1cc486bacdbb818c375a027680d5</id>
<content type='text'>
kpreempt_disabled worked for my testing because I tested on aarch64,
which doesn't have kpreemption.

XXX Should move curcpu_stable() to somewhere that other things can
use it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kpreempt_disabled worked for my testing because I tested on aarch64,
which doesn't have kpreemption.

XXX Should move curcpu_stable() to somewhere that other things can
use it.</pre>
</div>
</content>
</entry>
<entry>
<title>heartbeat(9): New mechanism to check progress of kernel.</title>
<updated>2023-07-07T12:34:49+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-07-07T12:34:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=de09df2fbee768e9082e19034d75860393b1d8c7'/>
<id>de09df2fbee768e9082e19034d75860393b1d8c7</id>
<content type='text'>
This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.

This doesn't supplant hardware watchdog timers.  It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.

Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future.  However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.

XXX kernel revbump -- changes struct cpu_info layout</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.

This doesn't supplant hardware watchdog timers.  It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.

Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future.  However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.

XXX kernel revbump -- changes struct cpu_info layout</pre>
</div>
</content>
</entry>
</feed>
