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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to