[PATCH 0/6] Get rid of CPUID from gettimeofday
tim.gardner at canonical.com
Fri Jun 6 19:13:40 UTC 2008
Alok Kataria wrote:
> On Fri, 2008-06-06 at 08:17 -0700, Tim Gardner wrote:
>> Alok Kataria wrote:
>>> There have been a series of patches committed to the mainline kernel
>>> recently that address a performance issue for gettimeofday when running
>>> on hypervisors that enable hardware assisted virtualization. The
>>> non-ideal performance occurs because a CPUID instruction is used to
>>> serialize the pipeline before RDTSC, and when using hardware
>>> virtualization, CPUID always exits to the hypervisor.
>>> The code in question also exists in the ubuntu-hardy tree.
>>> The fix is to use MFENCE/LFENCE instead of CPUID.
>>> This series of patches backports those commits for current ubuntu's git
>>> Please have a look.
>> So, I've been messing with your patch set, but it is kind of wound up in
>> the 'TSC Clocksource' patch which I reverted because it was shown to
>> cause suspend regressions:
>> It was suggested in the LP report that the original TSC commit was
>> incomplete when compared to upstream:
>> In fact, this appears to be the case.
> Hi Tim,
> The patch that i had posted earlier for TSC did take into account the
> software-suspend breakage.
> Looking back at the mail conversation that we had back then, the patch
> does have all those changes related to software suspend too. Attached is
> the mail conversation.
It appears that the original TSC patch that I applied simply wasn't
applied correctly, it missed the patch to kernel/time/timekeeping.c. I
think it looks correct now.
>> I've re-applied the original TSC
>> patch, then your most recent patch set. Please review at
I had to add support for native_read_tsc in order to build amd64. See
I've pushed to git://kernel.ubuntu.com/rtg/ubuntu-hardy-tsc
Tim Gardner tim.gardner at ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 964 bytes
Desc: not available
More information about the kernel-team