Date: Tue, 28 Oct 2008 03:43:13 -0700 From: Maxim Sobolev <sobomax@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin <jhb@FreeBSD.org> Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386 Message-ID: <4906ECC1.4080907@FreeBSD.org> In-Reply-To: <20081028202701.E85964@delplex.bde.org> References: <200810261858.m9QIw4YV091893@svn.freebsd.org> <200810271411.11813.jhb@freebsd.org> <20081028202701.E85964@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4906ECC1.4080907>