Date: Fri, 4 Dec 2009 10:47:08 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Ivan Voras <ivoras@freebsd.org> Subject: Re: Request for information - timers, hz, interrupts Message-ID: <200912041047.08253.jhb@freebsd.org> In-Reply-To: <hfb7ne$mi$1@ger.gmane.org> References: <hfb7ne$mi$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 04 December 2009 9:52:39 am Ivan Voras wrote: > For a long time, at least in the 6-stable timeframe, I was used to > seeing timer interrupts going at the frequency of 2*HZ, e.g. this is > from 6.4-RELEASE: > > kern.clockrate: { hz = 250, tick = 4000, profhz = 166, stathz = 33 } > debug.psm.hz: 20 > > cpu0: timer 6789885563 499 > cpu2: timer 6789885538 499 > cpu1: timer 6789885538 499 > cpu3: timer 6789885537 499 > > Then sometime in 7.x this changed to 4*HZ, which continues in 8.x, e.g. > from 7.2-RELEASE: > > kern.clockrate: { hz = 250, tick = 4000, profhz = 1000, stathz = 142 } > kern.hz: 250 > > cpu0: timer 1368329715 988 > cpu1: timer 1368324640 988 > cpu2: timer 1367642854 988 > cpu3: timer 1367642874 988 > > I'm not very worried about it (though maybe laptop users might be > because of potential power drainage) but would like to know the > explanation behind it. > > Presumably it has something to do with profhz but what and why? There > isn't an obvious correlation between profhz frequency in 6.x and HZ and > in 7.x. and HZ. It actually was changed to provide saner behavior when you use low hz values like 'hz=100'. Note that your stathz is now 142 instead of 33. The scheduler is likely far happier with that stathz. There is more detail in the commit log I believe (just look at the logs for local_apic.c in either svn or cvsweb). -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912041047.08253.jhb>