From owner-cvs-src@FreeBSD.ORG Sun Aug 15 18:02:10 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35BFF16A4CE; Sun, 15 Aug 2004 18:02:10 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B7E043D1D; Sun, 15 Aug 2004 18:02:10 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7FI2Aoc002424; Sun, 15 Aug 2004 18:02:10 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7FI2ApH002423; Sun, 15 Aug 2004 18:02:10 GMT (envelope-from rwatson) Message-Id: <200408151802.i7FI2ApH002423@repoman.freebsd.org> From: Robert Watson Date: Sun, 15 Aug 2004 18:02:10 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/conf files.i386 options.i386 src/sys/i386/i386 mp_machdep.c mp_watchdog.c src/sys/i386/include mp_watchdog.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2004 18:02:10 -0000 rwatson 2004-08-15 18:02:10 UTC FreeBSD src repository Modified files: sys/conf files.i386 options.i386 sys/i386/i386 mp_machdep.c Added files: sys/i386/i386 mp_watchdog.c sys/i386/include mp_watchdog.h Log: Add an "options MP_WATCHDOG" to i386. This option allows one of the logical CPUs on a system to be used as a dedicated watchdog to cause a drop to the debugger and/or generate an NMI to the boot processor if the kernel ceases to respond. A sysctl enables the watchdog running out of the processor's idle thread; a callout is launched to reset a timer in the watchdog. If the callout fails to reset the timer for ten seconds, the watchdog will fire. The sysctl allows you to select which CPU will run the watchdog. A sample "debug.leak_schedlock" is included, which causes a sysctl to spin holding sched_lock in order to trigger the watchdog. On my Xeons, the watchdog is able to detect this failure mode and break into the debugger, which cannot otherwise be done without an NMI button. This option does not currently work with sched_ule due to ule's push notion of scheduling, similar to machdep.hlt_logical_cpus failing to work with that scheduler. On face value, this might seem somewhat inefficient, but there are a lot of dual-processor Xeons with HTT around, so using one as a watchdog for testing is not as inefficient as one might fear. Revision Changes Path 1.503 +1 -0 src/sys/conf/files.i386 1.213 +1 -0 src/sys/conf/options.i386 1.234 +9 -0 src/sys/i386/i386/mp_machdep.c 1.1 +225 -0 src/sys/i386/i386/mp_watchdog.c (new) 1.1 +34 -0 src/sys/i386/include/mp_watchdog.h (new)