* [Qemu-devel] Para-Virtualized Clock Usage
@ 2013-04-22 16:58 Joji Mekkattuparamban (joji)
2013-04-23 5:52 ` Gleb Natapov
0 siblings, 1 reply; 7+ messages in thread
From: Joji Mekkattuparamban (joji) @ 2013-04-22 16:58 UTC (permalink / raw)
To: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
Greetings,
I have a SMP guest application, running on the 2.6.27 Linux kernel. The application, originally written for bare metal, makes extensive use of the TSC, by directly invoking rdtsc from the user space for timestamp purposes. While running on KVM (RHEL version 6.3), we are running into TSC issues on some hardware. As a solution, I am considering migrating to the pvclock. I am wondering if there is an example for migrating from TSC to the pvclock. Any pointers?
Thanks,
Joji.
[-- Attachment #2: Type: text/html, Size: 2305 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Para-Virtualized Clock Usage
2013-04-22 16:58 [Qemu-devel] Para-Virtualized Clock Usage Joji Mekkattuparamban (joji)
@ 2013-04-23 5:52 ` Gleb Natapov
2013-04-24 8:27 ` Marcelo Tosatti
0 siblings, 1 reply; 7+ messages in thread
From: Gleb Natapov @ 2013-04-23 5:52 UTC (permalink / raw)
To: Joji Mekkattuparamban (joji); +Cc: mtosatti, qemu-devel@nongnu.org, kvm
On Mon, Apr 22, 2013 at 04:58:01PM +0000, Joji Mekkattuparamban (joji) wrote:
> Greetings,
>
> I have a SMP guest application, running on the 2.6.27 Linux kernel. The application, originally written for bare metal, makes extensive use of the TSC, by directly invoking rdtsc from the user space for timestamp purposes. While running on KVM (RHEL version 6.3), we are running into TSC issues on some hardware. As a solution, I am considering migrating to the pvclock. I am wondering if there is an example for migrating from TSC to the pvclock. Any pointers?
>
Wrong list, you should ask KVM (copied). Recent kernels have pvclock
vdso support which means that gettimeofday() uses it without entering
the kernel. Marcelo?
--
Gleb.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Para-Virtualized Clock Usage
2013-04-23 5:52 ` Gleb Natapov
@ 2013-04-24 8:27 ` Marcelo Tosatti
2013-04-25 0:28 ` Joji Mekkattuparamban (joji)
0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Tosatti @ 2013-04-24 8:27 UTC (permalink / raw)
To: Gleb Natapov; +Cc: Joji Mekkattuparamban (joji), qemu-devel@nongnu.org, kvm
On Tue, Apr 23, 2013 at 08:52:16AM +0300, Gleb Natapov wrote:
> On Mon, Apr 22, 2013 at 04:58:01PM +0000, Joji Mekkattuparamban (joji) wrote:
> > Greetings,
> >
> > I have a SMP guest application, running on the 2.6.27 Linux kernel. The application, originally written for bare metal, makes extensive use of the TSC, by directly invoking rdtsc from the user space for timestamp purposes. While running on KVM (RHEL version 6.3), we are running into TSC issues on some hardware. As a solution, I am considering migrating to the pvclock. I am wondering if there is an example for migrating from TSC to the pvclock. Any pointers?
> >
> Wrong list, you should ask KVM (copied). Recent kernels have pvclock
> vdso support which means that gettimeofday() uses it without entering
> the kernel. Marcelo?
>
> --
> Gleb.
Converting application to make use of gettimeofday() should be the
best way to make use of pvclock, yes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Para-Virtualized Clock Usage
2013-04-24 8:27 ` Marcelo Tosatti
@ 2013-04-25 0:28 ` Joji Mekkattuparamban (joji)
2013-04-25 6:57 ` Gleb Natapov
0 siblings, 1 reply; 7+ messages in thread
From: Joji Mekkattuparamban (joji) @ 2013-04-25 0:28 UTC (permalink / raw)
To: Marcelo Tosatti, Gleb Natapov; +Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Thank you Gleb and Marcelo. I will migrate the API using gettimeofday.
Is there any dependency on the QEMU or the Guest? If the host supports pvclock and the guest invokes gettimeofday, would the pvclock be automatically used? Or do I require a patch in either the Qemu or the guest kernel?
Thanks!
Joji.
-----Original Message-----
From: Marcelo Tosatti [mailto:mtosatti@redhat.com]
Sent: Wednesday, April 24, 2013 1:28 AM
To: Gleb Natapov
Cc: Joji Mekkattuparamban (joji); qemu-devel@nongnu.org; kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Para-Virtualized Clock Usage
On Tue, Apr 23, 2013 at 08:52:16AM +0300, Gleb Natapov wrote:
> On Mon, Apr 22, 2013 at 04:58:01PM +0000, Joji Mekkattuparamban (joji) wrote:
> > Greetings,
> >
> > I have a SMP guest application, running on the 2.6.27 Linux kernel. The application, originally written for bare metal, makes extensive use of the TSC, by directly invoking rdtsc from the user space for timestamp purposes. While running on KVM (RHEL version 6.3), we are running into TSC issues on some hardware. As a solution, I am considering migrating to the pvclock. I am wondering if there is an example for migrating from TSC to the pvclock. Any pointers?
> >
> Wrong list, you should ask KVM (copied). Recent kernels have pvclock
> vdso support which means that gettimeofday() uses it without entering
> the kernel. Marcelo?
>
> --
> Gleb.
Converting application to make use of gettimeofday() should be the best way to make use of pvclock, yes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Para-Virtualized Clock Usage
2013-04-25 0:28 ` Joji Mekkattuparamban (joji)
@ 2013-04-25 6:57 ` Gleb Natapov
2013-05-15 20:40 ` Joji Mekkattuparamban (joji)
0 siblings, 1 reply; 7+ messages in thread
From: Gleb Natapov @ 2013-04-25 6:57 UTC (permalink / raw)
To: Joji Mekkattuparamban (joji)
Cc: Marcelo Tosatti, qemu-devel@nongnu.org, kvm@vger.kernel.org
On Thu, Apr 25, 2013 at 12:28:35AM +0000, Joji Mekkattuparamban (joji) wrote:
> Thank you Gleb and Marcelo. I will migrate the API using gettimeofday.
>
> Is there any dependency on the QEMU or the Guest? If the host supports pvclock and the guest invokes gettimeofday, would the pvclock be automatically used? Or do I require a patch in either the Qemu or the guest kernel?
>
Guest and host kernel should be at least 3.8. IIRC there is not QEMU
version dependency.
> Thanks!
> Joji.
>
> -----Original Message-----
> From: Marcelo Tosatti [mailto:mtosatti@redhat.com]
> Sent: Wednesday, April 24, 2013 1:28 AM
> To: Gleb Natapov
> Cc: Joji Mekkattuparamban (joji); qemu-devel@nongnu.org; kvm@vger.kernel.org
> Subject: Re: [Qemu-devel] Para-Virtualized Clock Usage
>
> On Tue, Apr 23, 2013 at 08:52:16AM +0300, Gleb Natapov wrote:
> > On Mon, Apr 22, 2013 at 04:58:01PM +0000, Joji Mekkattuparamban (joji) wrote:
> > > Greetings,
> > >
> > > I have a SMP guest application, running on the 2.6.27 Linux kernel. The application, originally written for bare metal, makes extensive use of the TSC, by directly invoking rdtsc from the user space for timestamp purposes. While running on KVM (RHEL version 6.3), we are running into TSC issues on some hardware. As a solution, I am considering migrating to the pvclock. I am wondering if there is an example for migrating from TSC to the pvclock. Any pointers?
> > >
> > Wrong list, you should ask KVM (copied). Recent kernels have pvclock
> > vdso support which means that gettimeofday() uses it without entering
> > the kernel. Marcelo?
> >
> > --
> > Gleb.
>
> Converting application to make use of gettimeofday() should be the best way to make use of pvclock, yes.
--
Gleb.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Para-Virtualized Clock Usage
2013-04-25 6:57 ` Gleb Natapov
@ 2013-05-15 20:40 ` Joji Mekkattuparamban (joji)
2013-05-16 8:37 ` Gleb Natapov
0 siblings, 1 reply; 7+ messages in thread
From: Joji Mekkattuparamban (joji) @ 2013-05-15 20:40 UTC (permalink / raw)
To: Gleb Natapov; +Cc: Marcelo Tosatti, qemu-devel@nongnu.org, kvm@vger.kernel.org
Hi Gleb,
On a related note, does Qemu have an option to emulate RDTSC?
Thanks,
Joji.
-----Original Message-----
From: Gleb Natapov [mailto:gleb@redhat.com]
Sent: Wednesday, April 24, 2013 11:57 PM
To: Joji Mekkattuparamban (joji)
Cc: Marcelo Tosatti; qemu-devel@nongnu.org; kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Para-Virtualized Clock Usage
On Thu, Apr 25, 2013 at 12:28:35AM +0000, Joji Mekkattuparamban (joji) wrote:
> Thank you Gleb and Marcelo. I will migrate the API using gettimeofday.
>
> Is there any dependency on the QEMU or the Guest? If the host supports pvclock and the guest invokes gettimeofday, would the pvclock be automatically used? Or do I require a patch in either the Qemu or the guest kernel?
>
Guest and host kernel should be at least 3.8. IIRC there is not QEMU version dependency.
> Thanks!
> Joji.
>
> -----Original Message-----
> From: Marcelo Tosatti [mailto:mtosatti@redhat.com]
> Sent: Wednesday, April 24, 2013 1:28 AM
> To: Gleb Natapov
> Cc: Joji Mekkattuparamban (joji); qemu-devel@nongnu.org;
> kvm@vger.kernel.org
> Subject: Re: [Qemu-devel] Para-Virtualized Clock Usage
>
> On Tue, Apr 23, 2013 at 08:52:16AM +0300, Gleb Natapov wrote:
> > On Mon, Apr 22, 2013 at 04:58:01PM +0000, Joji Mekkattuparamban (joji) wrote:
> > > Greetings,
> > >
> > > I have a SMP guest application, running on the 2.6.27 Linux kernel. The application, originally written for bare metal, makes extensive use of the TSC, by directly invoking rdtsc from the user space for timestamp purposes. While running on KVM (RHEL version 6.3), we are running into TSC issues on some hardware. As a solution, I am considering migrating to the pvclock. I am wondering if there is an example for migrating from TSC to the pvclock. Any pointers?
> > >
> > Wrong list, you should ask KVM (copied). Recent kernels have pvclock
> > vdso support which means that gettimeofday() uses it without
> > entering the kernel. Marcelo?
> >
> > --
> > Gleb.
>
> Converting application to make use of gettimeofday() should be the best way to make use of pvclock, yes.
--
Gleb.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Para-Virtualized Clock Usage
2013-05-15 20:40 ` Joji Mekkattuparamban (joji)
@ 2013-05-16 8:37 ` Gleb Natapov
0 siblings, 0 replies; 7+ messages in thread
From: Gleb Natapov @ 2013-05-16 8:37 UTC (permalink / raw)
To: Joji Mekkattuparamban (joji)
Cc: Marcelo Tosatti, qemu-devel@nongnu.org, kvm@vger.kernel.org
On Wed, May 15, 2013 at 08:40:25PM +0000, Joji Mekkattuparamban (joji) wrote:
> Hi Gleb,
>
> On a related note, does Qemu have an option to emulate RDTSC?
>
QEMU or KVM? With KVM guest executes RDTSC directly on CPU.
> Thanks,
> Joji.
>
> -----Original Message-----
> From: Gleb Natapov [mailto:gleb@redhat.com]
> Sent: Wednesday, April 24, 2013 11:57 PM
> To: Joji Mekkattuparamban (joji)
> Cc: Marcelo Tosatti; qemu-devel@nongnu.org; kvm@vger.kernel.org
> Subject: Re: [Qemu-devel] Para-Virtualized Clock Usage
>
> On Thu, Apr 25, 2013 at 12:28:35AM +0000, Joji Mekkattuparamban (joji) wrote:
> > Thank you Gleb and Marcelo. I will migrate the API using gettimeofday.
> >
> > Is there any dependency on the QEMU or the Guest? If the host supports pvclock and the guest invokes gettimeofday, would the pvclock be automatically used? Or do I require a patch in either the Qemu or the guest kernel?
> >
> Guest and host kernel should be at least 3.8. IIRC there is not QEMU version dependency.
>
> > Thanks!
> > Joji.
> >
> > -----Original Message-----
> > From: Marcelo Tosatti [mailto:mtosatti@redhat.com]
> > Sent: Wednesday, April 24, 2013 1:28 AM
> > To: Gleb Natapov
> > Cc: Joji Mekkattuparamban (joji); qemu-devel@nongnu.org;
> > kvm@vger.kernel.org
> > Subject: Re: [Qemu-devel] Para-Virtualized Clock Usage
> >
> > On Tue, Apr 23, 2013 at 08:52:16AM +0300, Gleb Natapov wrote:
> > > On Mon, Apr 22, 2013 at 04:58:01PM +0000, Joji Mekkattuparamban (joji) wrote:
> > > > Greetings,
> > > >
> > > > I have a SMP guest application, running on the 2.6.27 Linux kernel. The application, originally written for bare metal, makes extensive use of the TSC, by directly invoking rdtsc from the user space for timestamp purposes. While running on KVM (RHEL version 6.3), we are running into TSC issues on some hardware. As a solution, I am considering migrating to the pvclock. I am wondering if there is an example for migrating from TSC to the pvclock. Any pointers?
> > > >
> > > Wrong list, you should ask KVM (copied). Recent kernels have pvclock
> > > vdso support which means that gettimeofday() uses it without
> > > entering the kernel. Marcelo?
> > >
> > > --
> > > Gleb.
> >
> > Converting application to make use of gettimeofday() should be the best way to make use of pvclock, yes.
>
> --
> Gleb.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Gleb.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-16 8:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 16:58 [Qemu-devel] Para-Virtualized Clock Usage Joji Mekkattuparamban (joji)
2013-04-23 5:52 ` Gleb Natapov
2013-04-24 8:27 ` Marcelo Tosatti
2013-04-25 0:28 ` Joji Mekkattuparamban (joji)
2013-04-25 6:57 ` Gleb Natapov
2013-05-15 20:40 ` Joji Mekkattuparamban (joji)
2013-05-16 8:37 ` Gleb Natapov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).