From: Andrew Theurer <habanero@linux.vnet.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: gettimeofday() vsyscall for kvm-clock?
Date: Mon, 21 May 2012 17:13:29 -0500 [thread overview]
Message-ID: <4FBABE09.2010604@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120521203642.GA26834@amt.cnet>
On 05/21/2012 03:36 PM, Marcelo Tosatti wrote:
> On Mon, May 21, 2012 at 03:26:54PM -0500, Andrew Theurer wrote:
>> Wondering if a user-space gettimofday() for kvm-clock has been
>> considered before. I am seeing a pretty large difference in
>> performance between tsc and kvm-clock. I have to assume at least
>> some of this is due to the mode switch for kvm-clock. Here are the
>> results:
>>
>> (this is a 16 vCPU VM on a 16 thread 2S Nehalem-EP host, looped
>> gettimeofday() calls on all vCPUs)
>>
>> tsc: .0645 usec per call
>> kvm-clock: .4222 usec per call (6.54x)
>>
>>
>> -Andrew Theurer
>
> https://bugzilla.redhat.com/show_bug.cgi?id=679207
>
> "model name : Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
>
> native, gettimeofday (vsyscall): 45ns
> guest, kvmclock (syscall): 198ns"
>
> But this was before
>
> commit 489fb490dbf8dab0249ad82b56688ae3842a79e8
> Author: Glauber Costa<glommer@redhat.com>
> Date: Tue May 11 12:17:40 2010 -0400
>
> x86, paravirt: Add a global synchronization point for pvclock
>
> (see the full changelog for details).
>
> Can you try disabling the global variable, to see if that makes
> a difference (should not be enabled in production)? Untested patch
> (against guest kernel) below
The following was re-done on a 3.4 guest kernel (previously RHEL kernel):
1-way:
tsc: .0315
kvm-clock: .2112 (6.7x)
16-way:
tsc: .0432
kvm-clock: .4825 (11.1x)
Now with global var disabled:
16-way:
kvm-clock: .4628
Does not look like much of a difference.
-Andrew
prev parent reply other threads:[~2012-05-21 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 20:26 gettimeofday() vsyscall for kvm-clock? Andrew Theurer
2012-05-21 20:36 ` Marcelo Tosatti
2012-05-21 22:13 ` Andrew Theurer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FBABE09.2010604@linux.vnet.ibm.com \
--to=habanero@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.