Bug 840326 - KVM guest: sched_clock() broken across migration with differing TSC frequency
KVM guest: sched_clock() broken across migration with differing TSC frequency
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Marcelo Tosatti
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-15 18:22 EDT by Marcelo Tosatti
Modified: 2012-07-22 14:44 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-22 14:44:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marcelo Tosatti 2012-07-15 18:22:45 EDT
sched_clock() should not be using TSC as its not virtualized
but passthrough, meaning that migration can change TSC frequency.

unsigned long long sched_clock(void)
{
        unsigned long a = 0;

        rdtscll(a);
        return cycles_2_ns(a);
}

RHEL6 KVM guests and RHEL5 XEN guests correctly use pvclock to return 
time to sched_clock, but RHEL5 i386/x86_64 KVM guests are broken.

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