Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 491154 - divider option does not work with TSC clocksource
divider option does not work with TSC clocksource
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.7
i386 Linux
low Severity medium
: rc
: ---
Assigned To: Chris Lalancette
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-19 11:57 EDT by david ahern
Modified: 2018-10-19 21:53 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 15:35:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix TSC timesource with the tick divider (485 bytes, patch)
2009-03-20 11:14 EDT, Chris Lalancette
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1024 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.8 kernel security and bug fix update 2009-05-18 10:57:26 EDT

  None (edit)
Description david ahern 2009-03-19 11:57:56 EDT
Description of problem:
I am attempting to use the TSC as a clocksource for a RHEL4.7 based KVM guest, and the TSC is declared unstable:

...
kernel: checking TSC synchronization across 4 CPUs: passed.
...

kernel: Losing too many ticks!
kernel: TSC cannot be used as a timesource.
kernel: Possible reasons for this are:
kernel:   You're running with Speedstep,
kernel:   You don't have DMA enabled for your hard disk (see hdparm),
kernel:   Incorrect TSC synchronization on an SMP system (see dmesg).
kernel: Falling back to a sane timesource now.


How reproducible:
easy, just add the options and reboot.

Steps to Reproduce:
1. Add 'divider=4 clock=tsc' to kernel parameters
2. reboot
3. on reboot, run dmesg | egrep -i 'clock|time|tsc|pit|lost'

Actual results:
TSC clocksource declared unstable.

Expected results:
TSC clocksource works.

Additional info:
I instrumented the 4.7 kernel -- timer_tsc.c, mark_offset_tsc():

       if (lost >= 2) {
printk("delta %ld, lost %ld, delay_at_last_interrupt %d\n", delta, lost,
delay_at_last_interrupt);

On boot the messages right before it drops the TSC as a clocksource are:

delta 4000, lost 4, delay_at_last_interrupt 1
delta 4000, lost 4, delay_at_last_interrupt 1
delta 3999, lost 3, delay_at_last_interrupt 1
delta 4002, lost 4, delay_at_last_interrupt 1

At Marcelo's suggestion I changed HZ to REAL_HZ and the TSC clocksource works fine with the divider option. If you look at mark_offset_pmtmr, it uses REAL_HZ instead of HZ, so it appears to be an oversight on the TSC clocksource.
Comment 3 Chris Lalancette 2009-03-20 11:14:01 EDT
Created attachment 336058 [details]
Patch to fix TSC timesource with the tick divider
Comment 4 RHEL Product and Program Management 2009-03-20 11:18:01 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 7 Vivek Goyal 2009-03-25 09:30:00 EDT
Committed in 85.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Comment 15 errata-xmlrpc 2009-05-18 15:35:57 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1024.html

Note You need to log in before you can comment on or make changes to this bug.