[CentOS] tick_divider

Akemi Yagi amyagi at gmail.com
Sat Dec 8 18:48:12 UTC 2007


On Dec 8, 2007 2:18 AM, Akemi Yagi <amyagi at gmail.com> wrote:
> On Dec 6, 2007 8:52 AM, Scott McClanahan <scott.mcclanahan at trnswrks.com> wrote:
> > I just did.  Note I made a typo and commented on that in a second post.
> > Does tick_divider work successfully in a 64bit installation?  In the
> > changelog of the kernel installed on my test box (32bit) I see:
> >
> > - [x86] Fixes for the tick divider patch (Chris Lalancette ) [305011]
> >
> > Can anybody confirm that?

Almost forgot to answer this question ...

Yes, the patch is in kernel 2.6.18-53.1.4:
====================================================================
linux-2.6-x86-fixes-for-the-tick-divider-patch.patch

Subject: Re: [RHEL 5.1.z PATCH]: Fixes for the tick divider patch
Date: Tue, 02 Oct 2007 16:53:22 -0400
Bugzilla: 315471
Message-Id: <4702AFC2.9020702 at redhat.com>
Changelog: [x86] Fixes for the tick divider patch

All,
     While testing the tick divider patch under VMware, a number of issues were
found with it:

1)  On i386, when specifying "divider=10 apic=verbose", a bogus value was
printed for the CPU MHz and the host bus speed.  This is because during APIC
calibration, we were using "HZ/10" loops instead of "REAL_HZ/10", causing the
calculation to go out of bounds.

2)  On x86_64, when using the tick divider, it wasn't dividing the local APIC as
well as the external timer.  This causes problems under VMware since the
hypervisor (ESX server) has to deliver 1000 local APIC interrupts per second to
each logical processor, which can end up causing time drift.  By properly
dividing the local APIC as well as the external time source, it significantly
reduces the load on the HV, and the guests have less tendency to drift.

3)  On x86_64, we weren't looping during smp_local_timer_interrupt(), so we were
losing profiling ticks.

3)  On x86_64, when using the tick divider with PM-Timer, lost tick compensation
wasn't being calculated properly.  In particular, we would count ticks as lost
when they really weren't, because we were using HZ instead of REAL_HZ in the
lost calculation.

4)  On x86_64, TSC suffers from the same problem as PM-Timer.

The attached patch fixes all 4 of these problems.  Additionally, this patch also
adds a "hz=" command-line parameter for both i386 and x86_64.  This is nicer way
to specify the divider from a user point-of-view; they don't have to know the
current value of HZ in order to specify the HZ value they want.

These patches are not upstream, since upstream has since gone with the tickless
kernel.

Patches successfully tested by myself (just for verifying basic correctness),
and HP and VMware using ESX server.

This fixes BZ 305011.  Please review and ACK.

Chris Lalancette
====================================================================

This is the kernel I used in the latest test, and I did not see any
obvious difference with the tick_divider=10 option.  However, this
needs to be tested by others on different systems under different
conditions to get anything conclusive.

For your reference,

http://bugs.centos.org/file_download.php?file_id=389&type=bug
http://bugs.centos.org/file_download.php?file_id=390&type=bug

Akemi



More information about the CentOS mailing list