From owner-svn-src-head@FreeBSD.ORG Sun Nov 16 09:44:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 930B8D38; Sun, 16 Nov 2014 09:44:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65001177; Sun, 16 Nov 2014 09:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG9iVM5084772; Sun, 16 Nov 2014 09:44:31 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG9iUTJ084769; Sun, 16 Nov 2014 09:44:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411160944.sAG9iUTJ084769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 16 Nov 2014 09:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274583 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 09:44:31 -0000 Author: delphij Date: Sun Nov 16 09:44:30 2014 New Revision: 274583 URL: https://svnweb.freebsd.org/changeset/base/274583 Log: Default to use 10 seconds as nap interval instead of 1. Previously, we have a nap interval of 1 second while we have a timeout of 128 seconds by default, which could be an overkill, and for some hardware the patting action may be expensive. Note that the choice of nap interval is still arbitrary. We preferred a safe value where even when the system is very heavily loaded, the watchdog should not shoot the system down if it's not really hung. According to the manual page of Linux's watchdog daemon, the nap interval time of theirs is 10 seconds, which seems to be a reasonable value -- according to Intel documentation AP-725 (Document Number: 292273-001), ICH5's maximum timeout is about 37.5 seconds, which the ichwd(4) driver would set when we requested 128 seconds (although it should probably feed back this as an error and do not set the timeout). Since that's the shortest maximum value, 10 seconds seems to be a right choice for us too. Discussed with: alfred MFC after: 1 month Modified: head/usr.sbin/watchdogd/watchdogd.8 head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.8 ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.8 Sun Nov 16 07:58:06 2014 (r274582) +++ head/usr.sbin/watchdogd/watchdogd.8 Sun Nov 16 09:44:30 2014 (r274583) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2014 +.Dd November 16, 2014 .Dt WATCHDOGD 8 .Os .Sh NAME @@ -79,7 +79,7 @@ reboot if there are problems with the sc The .Fl s Ar sleep argument can be used to control the sleep period between each execution -of the check and defaults to one second. +of the check and defaults to 10 seconds. .Pp The .Fl t Ar timeout Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Sun Nov 16 07:58:06 2014 (r274582) +++ head/usr.sbin/watchdogd/watchdogd.c Sun Nov 16 09:44:30 2014 (r274583) @@ -87,7 +87,7 @@ static int is_dry_run = 0; /* do not ar static int do_timedog = 0; static int do_syslog = 1; static int fd = -1; -static int nap = 1; +static int nap = 10; static int carp_thresh_seconds = -1; static char *test_cmd = NULL;