From owner-svn-src-head@FreeBSD.ORG Tue Oct 28 10:42:43 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A15CF106566B; Tue, 28 Oct 2008 10:42:43 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 67F178FC2B; Tue, 28 Oct 2008 10:42:43 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.23] (S0106001372fd1e07.vs.shawcable.net [70.71.2.169]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id m9SAgfeO088126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Oct 2008 03:42:42 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <4906ECC1.4080907@FreeBSD.org> Date: Tue, 28 Oct 2008 03:43:13 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Bruce Evans References: <200810261858.m9QIw4YV091893@svn.freebsd.org> <200810271411.11813.jhb@freebsd.org> <20081028202701.E85964@delplex.bde.org> In-Reply-To: <20081028202701.E85964@delplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 28 Oct 2008 10:42:43 -0000 Bruce Evans wrote: > On Mon, 27 Oct 2008, John Baldwin wrote: > >> On Sunday 26 October 2008 02:58:04 pm Maxim Sobolev wrote: >>> Author: sobomax >>> Date: Sun Oct 26 18:58:04 2008 >>> New Revision: 184293 >>> URL: http://svn.freebsd.org/changeset/base/184293 >>> >>> Log: >>> Fix division by zero panic if kern.hz less than 32. >>> >>> MFC after: 1 day >> >> This is wrong. In the case you are worried about here, lapic_timer_hz >> is less >> than 128. There is no way you are going to fire stathz 128 times per >> second >> from a timer running at < 128 hz. You are effectively running stathz at >> lapic_timer_hz, so I would just set stathz = lapic_timer_hz in this case. > > stathz needs to be about 128 to work as intended, at least for SCHED_4BSD. > >> Also, I would drop the extra {}'s to match style(9) as well as the >> existing >> style of the file. > > I noticed this bug in the main commit too. > > Also, hz = 10 cannot work on i386 without lapic_timer, since the i8254 > timer > has a maximum interrupt period of 55 ms and thus a minimum frequency of > 18.2 Hz. Attempts to set it to 10 Hz cause similar bugs to the ones here > -- the best approximation of 18.2 is (supposed to be) used, but the system > is not informed about the enormous error in this approximation and still > thinks that 10 Hz is used. Does it suggest that we simply need to place lower limit of 128 on lapic_timer_hz and lower limit of 18 on i8254 timer? As far as I understand timer frequency could be higher than actual HZ (at least lapic code suggest that it can). Will it help or cause any other issues? -Maxim