From owner-freebsd-current@FreeBSD.ORG Fri Sep 16 20:03:11 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29ADD106564A for ; Fri, 16 Sep 2011 20:03:11 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id DE3948FC08 for ; Fri, 16 Sep 2011 20:03:10 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 9143C5DAF; Fri, 16 Sep 2011 20:03:08 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id p8GK38hu058775; Fri, 16 Sep 2011 20:03:08 GMT (envelope-from phk@phk.freebsd.dk) To: Arnaud Lacombe From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 16 Sep 2011 15:51:56 -0400." Content-Type: text/plain; charset=ISO-8859-1 Date: Fri, 16 Sep 2011 20:03:08 +0000 Message-ID: <58772.1316203388@critter.freebsd.dk> Cc: FreeBSD-Current Subject: Re: Very imprecise watchdogd(8) timeout X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 20:03:11 -0000 In message , Arnaud Lacombe writes: >I just had a look to the way the timeout specified to watchdogd is >passed to the kernel. watchdogd(8) says: The API was designed for simplicity, not precision. Watchdog hardware often have weird and strange limitations on the actual values you can set. A very typical, the most typical in my experience, is "some frequency, a binary prescaler, possibly with a counter. It is also not uncommon to have more than one watchdog mechanism in the same system. It would be overkill to design and implement a complex API to communicate these limitations to userland. So the API was designed around the power-of-two scale to give it a wide range, and with the semantics "no shorter than", to make it easy to use, and for multiple watchdogs to be engaged to the best of their ability. If this is not precise enough for you, come up with something better. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.