[PATCH 0/6] Get rid of CPUID from gettimeofday
Tim Gardner
tcanonical at tpi.com
Fri Jun 6 15:17:13 UTC 2008
Alok Kataria wrote:
> Hi,
>
> 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
> tree.
>
> Please have a look.
>
> Thanks,
> Alok
>
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:
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=commit;h=d617b07f7e8b465f29c82d84fbc12febf43b2900
It was suggested in the LP report that the original TSC commit was
incomplete when compared to upstream:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/226279/comments/95
In fact, this appears to be the case. I've re-applied the original TSC
patch, then your most recent patch set. Please review at
git://kernel.ubuntu.com/rtg/ubuntu-hardy-tsc.
I'll have a test build of this on my PPA sometime in the next couple of
days.
rtg
--
Tim Gardner tim.gardner at ubuntu.com
More information about the kernel-team
mailing list