diff options
author | attilio <attilio@FreeBSD.org> | 2011-04-28 16:02:05 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-04-28 16:02:05 +0000 |
commit | d685681d59c6feed493660adbeb6140c4fdab936 (patch) | |
tree | a77ab94179765e48d467fa200110ca442367a27e /sys/i386 | |
parent | 3f732e147ff863c0e7572174a1a11f2e1f7c7053 (diff) | |
download | FreeBSD-src-d685681d59c6feed493660adbeb6140c4fdab936.zip FreeBSD-src-d685681d59c6feed493660adbeb6140c4fdab936.tar.gz |
Add the watchdogs patting during the (shutdown time) disk syncing and
disk dumping.
With the option SW_WATCHDOG on, these operations are doomed to let
watchdog fire, fi they take too long.
I implemented the stubs this way because I really want wdog_kern_*
KPI to not be dependant by SW_WATCHDOG being on (and really, the option
only enables watchdog activation in hardclock) and also avoid to
call them when not necessary (avoiding not-volountary watchdog
activations).
Sponsored by: Sandvine Incorporated
Discussed with: emaste, des
MFC after: 2 weeks
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/minidump_machdep.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/i386/i386/minidump_machdep.c b/sys/i386/i386/minidump_machdep.c index 92c0b8f..d57de3a 100644 --- a/sys/i386/i386/minidump_machdep.c +++ b/sys/i386/i386/minidump_machdep.c @@ -27,6 +27,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_watchdog.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> @@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/kerneldump.h> #include <sys/msgbuf.h> +#ifdef SW_WATCHDOG +#include <sys/watchdog.h> +#endif #include <vm/vm.h> #include <vm/pmap.h> #include <machine/atomic.h> @@ -138,6 +143,9 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) printf(" %lld", PG2MB(progress >> PAGE_SHIFT)); counter &= (1<<24) - 1; } +#ifdef SW_WATCHDOG + wdog_kern_pat(WD_LASTVAL); +#endif if (ptr) { error = dump_write(di, ptr, 0, dumplo, len); if (error) |