summaryrefslogtreecommitdiffstats
path: root/usr.sbin/watchdogd
diff options
context:
space:
mode:
authorzont <zont@FreeBSD.org>2012-08-28 08:38:53 +0000
committerzont <zont@FreeBSD.org>2012-08-28 08:38:53 +0000
commitaae8be3bc8c6ea786bc8ea8d8d628ef486b27304 (patch)
tree14b2380e5984ebd6c29b7800442a7826c9e272bd /usr.sbin/watchdogd
parenteea1a6d705d0af2a3e63341257e2481483e430b6 (diff)
downloadFreeBSD-src-aae8be3bc8c6ea786bc8ea8d8d628ef486b27304.zip
FreeBSD-src-aae8be3bc8c6ea786bc8ea8d8d628ef486b27304.tar.gz
- Don't allow watchdogd(8) to be swapped out.
On machines with huge amount of swap and high IO activity, watchdogd(8) may wait for a swap memory longer than timeout and sometimes fires. Approved by: kib (mentor) MFC after: 1 week
Diffstat (limited to 'usr.sbin/watchdogd')
-rw-r--r--usr.sbin/watchdogd/watchdogd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c
index 7bae4ff..f0896a9 100644
--- a/usr.sbin/watchdogd/watchdogd.c
+++ b/usr.sbin/watchdogd/watchdogd.c
@@ -118,6 +118,8 @@ main(int argc, char *argv[])
pidfile_write(pfh);
if (madvise(0, 0, MADV_PROTECT) != 0)
warn("madvise failed");
+ if (mlockall(MCL_FUTURE) != 0)
+ warn("mlockall failed");
watchdog_loop();
OpenPOWER on IntegriCloud