From owner-freebsd-arch@freebsd.org Sun Dec 31 18:01:48 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C92DE8A125 for ; Sun, 31 Dec 2017 18:01:48 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6F77CDD2; Sun, 31 Dec 2017 18:01:48 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBVI1eE1082421; Sun, 31 Dec 2017 10:01:40 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBVI1eCP082420; Sun, 31 Dec 2017 10:01:40 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201712311801.vBVI1eCP082420@pdx.rh.CN85.dnsmgr.net> Subject: Re: making SW_WATCHDOG dynamic In-Reply-To: <201712311503.vBVF3DqQ040555@mail.karels.net> To: karels@freebsd.org Date: Sun, 31 Dec 2017 10:01:40 -0800 (PST) CC: freebsd-arch@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 18:01:48 -0000 > My proposed change is in Phabricator, https://reviews.freebsd.org/D13713. > > A couple of notes: > > - I retained the SW_WATCHDOG option; it now just enables the software > watchdog even if a hardware watchdog is attached, as it would have done > in the past. The SW_WATCHDOG option has changed in function, it use to control if this code was compiled in at all, it now does something different. This code is compile in now no matter what with no option to remove it, which means there is one more rarely used option in the GENERIC kernel that can not be removed. 1 byte or 100 does not matter, it is that policy has been shoved down the users throat. "You shall have a software watchdog timer in your kernel weither you want it there or not, and it is turned off by default." We have way to many of those types of things already, adding to this list is going in the wrong direction. > I updated NOTES and the watchdog(4) information accordingly. This change as it stands requires a RELNOTES flag. > I did not provide for any other combination of watchdogs or actions; that > would require a complete rework of the kernel API. Note that the hardware > watchdogs provide no choice of action; they simply reset the box. > > - I have tested this with and without the SW_WATCHDOG option, but do not > have a hardware watchdog to test with. If someone could test this, it would > be much apprectiated. I tested by enabling watchdogd with default parameters, > doing b"killall -STOP watchdogd", and then observing that the system dropped > into the debugger after about 128 sec. It drops into the debugger if KDB > is defined and KDB_UNATTENDED is not; otherise it panics (as before). > > I neglected to respond this this from Andriy Gapon: > > P.S. > > And maybe just using the second software watchdog would be good enough for what > > you are doing? > > I think the hardclock-based SW_WATCHDOG is better than the --softtimeout > wactchdog because it runs at a lower level (hardclock vs callout/softclock). > In particular, I have found it to work in situations where a locking > deadly embrace started in the network stack, and then a callout routine > got stuck as well when a function it called blocked on the offending lock. > That caused watchdogd to fail to be rescheduled, and the watchdog fired as > a result. The callout-based facility could have been blocked out as well. > > Mike > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > -- Rod Grimes rgrimes@freebsd.org