All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Glauber Costa <glommer@redhat.com>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	kurt.hackel@oracle.com, the arch/x86 maintainers <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Glauber de Oliveira Costa <gcosta@redhat.com>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>,
	zach.brown@oracle.com, chris.mason@oracle.com,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall	implementation
Date: Sun, 01 Nov 2009 11:32:57 +0200	[thread overview]
Message-ID: <4AED55C9.9010301@redhat.com> (raw)
In-Reply-To: <ffdfacb2-bc41-40b3-8a35-550fd441d77b@default>

On 10/29/2009 05:55 PM, Dan Magenheimer wrote:
>> From: Avi Kivity [mailto:avi@redhat.com]
>> Sent: Thursday, October 29, 2009 9:07 AM
>> To: Dan Magenheimer
>> Cc: Jeremy Fitzhardinge; Glauber Costa; Jeremy Fitzhardinge; Kurt
>> Hackel; the arch/x86 maintainers; Linux Kernel Mailing List;
>> Glauber de
>> Oliveira Costa; Xen-devel; Keir Fraser; Zach Brown; Chris Mason; Ingo
>> Molnar
>> Subject: Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall
>> implementation
>>
>>
>> On 10/29/2009 04:46 PM, Dan Magenheimer wrote:
>>      
>>> No, the apps I'm familiar with (a DB and a JVM) need a timestamp
>>> not a monotonic counter.  The timestamps must be relatively
>>> accurate (e.g. we've been talking about gettimeofday generically,
>>> but these apps would use clock_gettime for nsec resolution),
>>> monotonically increasing, and work properly across a VM
>>> migration.  The timestamps are taken up to a 100K/sec or
>>> more so the apps need to ensure they are using the fastest
>>> mechanism available that meets those requirements.
>>>        
>> Out of interest, do you know (and can you relate) why those apps need
>> 100k/sec monotonically increasing timestamps?
>>      
> I don't have any public data available for this DB usage, but basically
> assume it is measuring transactions at a very high throughput, some
> of which are to a memory-resident portion of the DB.  Anecdotally,
> I'm told the difference between non-vsyscall gettimeofday
> and native rdtsc (on a machine with Invariant TSC support) can
> affect overall DB performance by as much as 10-20%.
>    

Sorry, that doesn't explain anything.

> I did find the following public link for the JVM:
>
> http://download.oracle.com/docs/cd/E13188_01/jrockit/tools/intro/jmc3.html
>
> Search for "flight recorder".  This feature is intended to
> be enabled all the time, but with non-vsyscall gettimeofday
> the performance impact is unacceptably high, so they are using
> rdtscp instead (on those machines where it is available).  With
> rdtscp, the performance impact is not measureable.
>
> Though the processor/server vendors have finally fixed the
> "unsynced TSC" problem on recent x86 platforms, thus allowing
> enterprise software to obtain timestamps at rdtsc performance,
> the problem comes back all over again with virtualization
> because of migration.  Jeremy's vsyscall+pvclock is a great
> solution if the app can ensure that it is present; if not,
> the apps will instead continue to use rdtsc as even emulated
> rdtsc is 2-3x faster than non-vsyscall gettimeofday.
>
> Does that help?
>    

For profiling work fast timestamping is of course great, but surely 
there is no monotonicity requirement?

I don't think we'll be able to provide monotonicity with vsyscall on 
tsc-broken hosts, so we'll be limited to correcting the tsc frequency 
after migration for good-tsc hosts.

-- 
error compiling committee.c: too many arguments to function


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	kurt.hackel@oracle.com, Glauber Costa <glommer@redhat.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Glauber de Oliveira Costa <gcosta@redhat.com>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>,
	zach.brown@oracle.com, Ingo Molnar <mingo@redhat.com>,
	chris.mason@oracle.com
Subject: Re: Re: [PATCH 3/5] x86/pvclock: add vsyscall	implementation
Date: Sun, 01 Nov 2009 11:32:57 +0200	[thread overview]
Message-ID: <4AED55C9.9010301@redhat.com> (raw)
In-Reply-To: <ffdfacb2-bc41-40b3-8a35-550fd441d77b@default>

On 10/29/2009 05:55 PM, Dan Magenheimer wrote:
>> From: Avi Kivity [mailto:avi@redhat.com]
>> Sent: Thursday, October 29, 2009 9:07 AM
>> To: Dan Magenheimer
>> Cc: Jeremy Fitzhardinge; Glauber Costa; Jeremy Fitzhardinge; Kurt
>> Hackel; the arch/x86 maintainers; Linux Kernel Mailing List;
>> Glauber de
>> Oliveira Costa; Xen-devel; Keir Fraser; Zach Brown; Chris Mason; Ingo
>> Molnar
>> Subject: Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall
>> implementation
>>
>>
>> On 10/29/2009 04:46 PM, Dan Magenheimer wrote:
>>      
>>> No, the apps I'm familiar with (a DB and a JVM) need a timestamp
>>> not a monotonic counter.  The timestamps must be relatively
>>> accurate (e.g. we've been talking about gettimeofday generically,
>>> but these apps would use clock_gettime for nsec resolution),
>>> monotonically increasing, and work properly across a VM
>>> migration.  The timestamps are taken up to a 100K/sec or
>>> more so the apps need to ensure they are using the fastest
>>> mechanism available that meets those requirements.
>>>        
>> Out of interest, do you know (and can you relate) why those apps need
>> 100k/sec monotonically increasing timestamps?
>>      
> I don't have any public data available for this DB usage, but basically
> assume it is measuring transactions at a very high throughput, some
> of which are to a memory-resident portion of the DB.  Anecdotally,
> I'm told the difference between non-vsyscall gettimeofday
> and native rdtsc (on a machine with Invariant TSC support) can
> affect overall DB performance by as much as 10-20%.
>    

Sorry, that doesn't explain anything.

> I did find the following public link for the JVM:
>
> http://download.oracle.com/docs/cd/E13188_01/jrockit/tools/intro/jmc3.html
>
> Search for "flight recorder".  This feature is intended to
> be enabled all the time, but with non-vsyscall gettimeofday
> the performance impact is unacceptably high, so they are using
> rdtscp instead (on those machines where it is available).  With
> rdtscp, the performance impact is not measureable.
>
> Though the processor/server vendors have finally fixed the
> "unsynced TSC" problem on recent x86 platforms, thus allowing
> enterprise software to obtain timestamps at rdtsc performance,
> the problem comes back all over again with virtualization
> because of migration.  Jeremy's vsyscall+pvclock is a great
> solution if the app can ensure that it is present; if not,
> the apps will instead continue to use rdtsc as even emulated
> rdtsc is 2-3x faster than non-vsyscall gettimeofday.
>
> Does that help?
>    

For profiling work fast timestamping is of course great, but surely 
there is no monotonicity requirement?

I don't think we'll be able to provide monotonicity with vsyscall on 
tsc-broken hosts, so we'll be limited to correcting the tsc frequency 
after migration for good-tsc hosts.

-- 
error compiling committee.c: too many arguments to function

  parent reply	other threads:[~2009-11-01  9:33 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06  0:50 [PATCH RFC] Extending pvclock down to usermode for vsyscall Jeremy Fitzhardinge
2009-10-06  0:50 ` Jeremy Fitzhardinge
2009-10-06  0:50 ` [PATCH 1/5] x86/pvclock: make sure rdtsc doesn't speculate out of region Jeremy Fitzhardinge
2009-10-06  0:50   ` Jeremy Fitzhardinge
2009-10-06  0:50 ` [PATCH 2/5] x86/pvclock: no need to use strong read barriers in pvclock_get_time_values Jeremy Fitzhardinge
2009-10-06  0:50   ` Jeremy Fitzhardinge
2009-10-06  0:50 ` [PATCH 3/5] x86/pvclock: add vsyscall implementation Jeremy Fitzhardinge
2009-10-06  0:50   ` Jeremy Fitzhardinge
2009-10-06  9:04   ` Avi Kivity
2009-10-06  9:04     ` Avi Kivity
2009-10-06 14:19     ` Dan Magenheimer
2009-10-06 14:19       ` Dan Magenheimer
2009-10-06 15:11       ` Avi Kivity
2009-10-06 15:11         ` Avi Kivity
2009-10-06 18:46     ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-06 18:46       ` Jeremy Fitzhardinge
2009-10-07 10:25       ` [Xen-devel] " Avi Kivity
2009-10-07 10:25         ` Avi Kivity
2009-10-07 19:29         ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-07 19:29           ` Jeremy Fitzhardinge
2009-10-07 20:09           ` [Xen-devel] " Avi Kivity
2009-10-07 20:09             ` Avi Kivity
2009-10-07 21:19             ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-07 21:19               ` Jeremy Fitzhardinge
2009-10-07 21:37               ` [Xen-devel] " Avi Kivity
2009-10-07 21:37                 ` Avi Kivity
2009-10-07 21:51                 ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-07 21:51                   ` Jeremy Fitzhardinge
2009-10-07 21:53                   ` [Xen-devel] " Avi Kivity
2009-10-07 21:53                     ` Avi Kivity
2009-10-07 20:48         ` [Xen-devel] " Dan Magenheimer
2009-10-07 20:48           ` Dan Magenheimer
2009-10-07 21:08           ` [Xen-devel] " Avi Kivity
2009-10-07 21:08             ` Avi Kivity
2009-10-07 22:36             ` [Xen-devel] " Dan Magenheimer
2009-10-07 22:36               ` Dan Magenheimer
2009-10-10  0:24         ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-10  0:24           ` Jeremy Fitzhardinge
2009-10-10 18:10           ` [Xen-devel] " Avi Kivity
2009-10-10 18:10             ` Avi Kivity
2009-10-12 18:20             ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-12 18:20               ` Jeremy Fitzhardinge
2009-10-12 18:29               ` [Xen-devel] " Avi Kivity
2009-10-12 18:29                 ` Avi Kivity
2009-10-12 19:13                 ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-12 19:13                   ` Jeremy Fitzhardinge
2009-10-13  6:39                   ` [Xen-devel] " Avi Kivity
2009-10-13  6:39                     ` Avi Kivity
2009-10-13 20:00                     ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-13 20:00                       ` Jeremy Fitzhardinge
2009-10-14 12:32                       ` [Xen-devel] " Avi Kivity
2009-10-14 12:32                         ` Avi Kivity
2009-10-15 19:17                         ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-15 19:17                           ` Jeremy Fitzhardinge
2009-10-27 17:29                         ` [Xen-devel] " Dan Magenheimer
2009-10-27 17:29                           ` Dan Magenheimer
2009-10-27 18:20                           ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-27 18:20                             ` Jeremy Fitzhardinge
2009-10-28  5:52                             ` [Xen-devel] " Avi Kivity
2009-10-28  5:52                               ` Avi Kivity
2009-10-28  9:29                               ` [Xen-devel] " Glauber Costa
2009-10-28  9:34                                 ` Avi Kivity
2009-10-28  9:34                                   ` Avi Kivity
2009-10-28 17:47                                   ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-28 17:47                                     ` Jeremy Fitzhardinge
2009-10-29 12:13                                     ` [Xen-devel] " Avi Kivity
2009-10-29 12:13                                       ` Avi Kivity
2009-10-29 13:03                                       ` [Xen-devel] " Chris Mason
2009-10-29 13:03                                         ` Chris Mason
2009-10-29 14:46                                       ` [Xen-devel] " Dan Magenheimer
2009-10-29 14:46                                         ` Dan Magenheimer
2009-10-29 15:07                                         ` [Xen-devel] " Avi Kivity
2009-10-29 15:07                                           ` Avi Kivity
2009-10-29 15:55                                           ` [Xen-devel] " Dan Magenheimer
2009-10-29 15:55                                             ` Dan Magenheimer
2009-10-29 16:15                                             ` [Xen-devel] " Dan Magenheimer
2009-10-29 16:15                                               ` Dan Magenheimer
2009-11-01  9:28                                               ` [Xen-devel] " Avi Kivity
2009-11-01  9:28                                                 ` Avi Kivity
2009-11-02 15:28                                                 ` [Xen-devel] " Dan Magenheimer
2009-11-02 15:28                                                   ` Dan Magenheimer
2009-11-02 15:41                                                   ` [Xen-devel] " Avi Kivity
2009-11-02 15:41                                                     ` Avi Kivity
2009-11-01  9:32                                             ` Avi Kivity [this message]
2009-11-01  9:32                                               ` Avi Kivity
2009-11-02 15:46                                               ` [Xen-devel] " Dan Magenheimer
2009-11-02 15:46                                                 ` Dan Magenheimer
2009-11-03  5:12                                                 ` [Xen-devel] " Avi Kivity
2009-11-03  5:12                                                   ` Avi Kivity
2009-11-04 20:30                                                   ` [Xen-devel] " Dan Magenheimer
2009-11-04 20:30                                                     ` Dan Magenheimer
2009-11-05  6:47                                                     ` [Xen-devel] " Avi Kivity
2009-11-05  6:47                                                       ` Avi Kivity
2009-11-05 14:52                                                       ` [Xen-devel] " Dan Magenheimer
2009-11-05 14:52                                                         ` Dan Magenheimer
2009-11-05 15:07                                                         ` [Xen-devel] " Keir Fraser
2009-11-05 15:07                                                           ` Keir Fraser
2009-11-04 21:19                                           ` [Xen-devel] " john stultz
2009-11-04 21:19                                             ` john stultz
2009-11-04 21:28                                             ` Dan Magenheimer
2009-11-04 21:28                                               ` Dan Magenheimer
2009-11-05  0:02                                               ` [Xen-devel] " john stultz
2009-11-05  0:02                                                 ` john stultz
2009-11-05  0:45                                                 ` [Xen-devel] " Dan Magenheimer
2009-11-05  0:45                                                   ` Dan Magenheimer
2009-10-30 23:30                                     ` pvclock implementation in pv_ops kernel: why not __native_read_tsc()? Dan Magenheimer
2009-10-31  1:17                                       ` Jeremy Fitzhardinge
2009-10-06  0:50 ` [PATCH 4/5] x86/fixmap: add a predicate for usermode fixmaps Jeremy Fitzhardinge
2009-10-06  0:50   ` Jeremy Fitzhardinge
2009-10-06 10:23   ` [Xen-devel] " Jan Beulich
2009-10-06 10:23     ` Jan Beulich
2009-10-06 18:47     ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-06 18:47       ` Jeremy Fitzhardinge
2009-10-06  0:50 ` [PATCH 5/5] xen/time: add pvclock_clocksource_vread support Jeremy Fitzhardinge
2009-10-06  0:50   ` Jeremy Fitzhardinge
2009-10-06 10:28   ` [Xen-devel] " Jan Beulich
2009-10-06 10:28     ` Jan Beulich
2009-10-06 18:48     ` [Xen-devel] " Jeremy Fitzhardinge
2009-10-06 18:48       ` Jeremy Fitzhardinge

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=4AED55C9.9010301@redhat.com \
    --to=avi@redhat.com \
    --cc=chris.mason@oracle.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=gcosta@redhat.com \
    --cc=glommer@redhat.com \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=jeremy@goop.org \
    --cc=keir.fraser@eu.citrix.com \
    --cc=kurt.hackel@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=zach.brown@oracle.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.