From owner-freebsd-arch Mon Nov 18 20:47:46 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A9E037B401 for ; Mon, 18 Nov 2002 20:47:45 -0800 (PST) Received: from ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C2F543E6E for ; Mon, 18 Nov 2002 20:47:44 -0800 (PST) (envelope-from ambrisko@www.ambrisko.com) Received: from www.ambrisko.com (localhost [127.0.0.1]) by ambrisko.com (8.12.6/8.12.6) with ESMTP id gAJ4lSNB099879; Mon, 18 Nov 2002 20:47:28 -0800 (PST) (envelope-from ambrisko@www.ambrisko.com) Received: (from ambrisko@localhost) by www.ambrisko.com (8.12.6/8.12.6/Submit) id gAJ4lRTN099876; Mon, 18 Nov 2002 20:47:27 -0800 (PST) From: Doug Ambrisko Message-Id: <200211190447.gAJ4lRTN099876@www.ambrisko.com> Subject: Re: Software Watchdog In-Reply-To: <5011.1037437534@critter.freebsd.dk> To: Poul-Henning Kamp Date: Mon, 18 Nov 2002 20:47:27 -0800 (PST) Cc: Jeff Roberson , arch@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Poul-Henning Kamp writes: | In message <20021115191632.U22491-100000@mail.chesapeake.net>, Jeff Roberson wr | ites: | >Sean Kelly has implemented a software watchdog based on input from myself | >and Peter. This works through a simple watcdog daemon that checks in with | >the kernel every so often. The kernel complains via hardclock() if the | >watchdog times out. This will be very useful for debugging hard lockups | >because hardclock() comes in through a fast intr. There are few things | >that will stop hardclock() from firing. | | Does it have hooks for supporting hardware watchdogs ? I've done something similar that hooks into HW watchdogs via a systctl so you can kldload a HW watchdog. I haven't put much effort into it except to make it work for us in our environment until we know the direction of FreeBSD. One thing that would make things easier is to extend the syctl stuff in the kernel such that you could just call it and not have to find the syctl that you need. http://www.ambrisko.com/doug/watchdog Also I need to add guards for bounds. The idea is to use the HW watchdog to enforce the SW watchdog. Ideally the SW watchdog will go off and give you a trace. If the machine is so dead the SW one is broken then the HW watchdog will reset it. I think "dynamically" linking it in via sysctl makes things easier. HW watchdogs are very common in newer PC's to deal with TCO stuff. Some things there are used for in the BIOS is to try different timings until the machine doesn't lock up for example. Also it is then easy to disable the HW watchdog before entering ddb etc by call the sysctl to disable it. Sounds reasonable ... stupid???? It's helped us. Doug A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message