[PATCH 0/6] Get rid of CPUID from gettimeofday

Alok Kataria akataria at vmware.com
Fri Jun 6 17:56:41 UTC 2008

On Fri, 2008-06-06 at 08:17 -0700, Tim Gardner wrote:
> 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.

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.

>  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.

As far as these patches are concerned, i had a look, they seem correct.
Thanks for applying.

> I'll have a test build of this on my PPA sometime in the next couple of
> days.

Let me know incase you run into any problems.
> rtg
> --
> Tim Gardner tim.gardner at ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ubuntu-tsc-fix-mail
Type: application/mbox
Size: 10370 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20080606/1c0dae9f/attachment.mbox>

More information about the kernel-team mailing list