svn commit: r240243 - stable/8/usr.sbin/watchdogd

Andrey Zonov zont at FreeBSD.org
Sat Sep 8 18:07:35 UTC 2012


Author: zont
Date: Sat Sep  8 18:07:35 2012
New Revision: 240243
URL: http://svn.freebsd.org/changeset/base/240243

Log:
  MFC r239769:
  - 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.
  
  MFC r239896:
  - It's also need to lock current memory.

Modified:
  stable/8/usr.sbin/watchdogd/watchdogd.c
Directory Properties:
  stable/8/usr.sbin/watchdogd/   (props changed)

Modified: stable/8/usr.sbin/watchdogd/watchdogd.c
==============================================================================
--- stable/8/usr.sbin/watchdogd/watchdogd.c	Sat Sep  8 18:06:18 2012	(r240242)
+++ stable/8/usr.sbin/watchdogd/watchdogd.c	Sat Sep  8 18:07:35 2012	(r240243)
@@ -120,6 +120,8 @@ main(int argc, char *argv[])
 		pidfile_write(pfh);
 		if (madvise(0, 0, MADV_PROTECT) != 0)
 			warn("madvise failed");
+		if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0)
+			warn("mlockall failed");
 
 		watchdog_loop();
 


More information about the svn-src-all mailing list