* kvm tools: clock sources for hrtimer
@ 2011-11-09 14:27 Richard Weinberger
2011-11-09 14:49 ` Sasha Levin
0 siblings, 1 reply; 9+ messages in thread
From: Richard Weinberger @ 2011-11-09 14:27 UTC (permalink / raw)
To: penberg; +Cc: kvm, mingo, asias.hejun, gorcunov, Sasha Levin
Hi!
Is there any way to have high resolution clock sources?
Currently the native kvm tool seems to support only jiffies:
$ cat
/sys/devices/system/clocksource/clocksource0/available_clocksource
jiffies
Using qemu-kvm with the same kernel/host I can use tsc, hpet, acpi_pm.
Thanks,
//richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 14:27 kvm tools: clock sources for hrtimer Richard Weinberger
@ 2011-11-09 14:49 ` Sasha Levin
2011-11-09 15:42 ` Richard Weinberger
0 siblings, 1 reply; 9+ messages in thread
From: Sasha Levin @ 2011-11-09 14:49 UTC (permalink / raw)
To: Richard Weinberger; +Cc: penberg, kvm, mingo, asias.hejun, gorcunov
On Wed, 2011-11-09 at 16:27 +0200, Richard Weinberger wrote:
> Hi!
>
> Is there any way to have high resolution clock sources?
> Currently the native kvm tool seems to support only jiffies:
> $ cat
> /sys/devices/system/clocksource/clocksource0/available_clocksource
> jiffies
>
> Using qemu-kvm with the same kernel/host I can use tsc, hpet, acpi_pm.
>
> Thanks,
> //richard
>
We'll do kvm_clock as well if you compile it in the kernel.
I don't think that using a non-pv clocksource in a guest will do you
much good either.
--
Sasha.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 14:49 ` Sasha Levin
@ 2011-11-09 15:42 ` Richard Weinberger
2011-11-09 15:49 ` Sasha Levin
0 siblings, 1 reply; 9+ messages in thread
From: Richard Weinberger @ 2011-11-09 15:42 UTC (permalink / raw)
To: Sasha Levin; +Cc: penberg, kvm, mingo, asias.hejun, gorcunov
On Wed, 09 Nov 2011 16:49:51 +0200, Sasha Levin
<levinsasha928@gmail.com> wrote:
> We'll do kvm_clock as well if you compile it in the kernel.
CONFIG_HIGH_RES_TIMERS is on both host and guest kernels enabled.
BTW: Why adds the kvm tool "notsc" to the guest's kernel command line?
> I don't think that using a non-pv clocksource in a guest will do you
> much good either.
Using qemu-kvm I get pretty good results...
Thanks,
//richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 15:42 ` Richard Weinberger
@ 2011-11-09 15:49 ` Sasha Levin
2011-11-09 16:00 ` Cyrill Gorcunov
0 siblings, 1 reply; 9+ messages in thread
From: Sasha Levin @ 2011-11-09 15:49 UTC (permalink / raw)
To: Richard Weinberger; +Cc: penberg, kvm, mingo, asias.hejun, gorcunov
On Wed, 2011-11-09 at 17:42 +0200, Richard Weinberger wrote:
> On Wed, 09 Nov 2011 16:49:51 +0200, Sasha Levin
> <levinsasha928@gmail.com> wrote:
> > We'll do kvm_clock as well if you compile it in the kernel.
>
> CONFIG_HIGH_RES_TIMERS is on both host and guest kernels enabled.
> BTW: Why adds the kvm tool "notsc" to the guest's kernel command line?
You'll need CONFIG_KVM_CLOCK.
I'm not actually sure how close our implementation is to having tsc
working so far, Cyrill knows more about that than me.
> > I don't think that using a non-pv clocksource in a guest will do you
> > much good either.
>
> Using qemu-kvm I get pretty good results...
>
> Thanks,
> //richard
--
Sasha.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 15:49 ` Sasha Levin
@ 2011-11-09 16:00 ` Cyrill Gorcunov
2011-11-09 16:14 ` Cyrill Gorcunov
2011-11-09 18:56 ` Richard Weinberger
0 siblings, 2 replies; 9+ messages in thread
From: Cyrill Gorcunov @ 2011-11-09 16:00 UTC (permalink / raw)
To: Sasha Levin; +Cc: Richard Weinberger, penberg, kvm, mingo, asias.hejun
On Wed, Nov 09, 2011 at 05:49:53PM +0200, Sasha Levin wrote:
> On Wed, 2011-11-09 at 17:42 +0200, Richard Weinberger wrote:
> > On Wed, 09 Nov 2011 16:49:51 +0200, Sasha Levin
> > <levinsasha928@gmail.com> wrote:
> > > We'll do kvm_clock as well if you compile it in the kernel.
> >
> > CONFIG_HIGH_RES_TIMERS is on both host and guest kernels enabled.
> > BTW: Why adds the kvm tool "notsc" to the guest's kernel command line?
>
> You'll need CONFIG_KVM_CLOCK.
>
> I'm not actually sure how close our implementation is to having tsc
> working so far, Cyrill knows more about that than me.
>
We dropped tsc while were debuggin timer interrupts and apic routing
setup, it might be not needed already. (Still to be fair I'm not sure
does kvm hypervisor has a control bit set for tsc and cause or not vm-exit).
In short -- you could drop this from command line and tell us how it goes ;)
Cyrill
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 16:00 ` Cyrill Gorcunov
@ 2011-11-09 16:14 ` Cyrill Gorcunov
2011-11-09 18:56 ` Richard Weinberger
1 sibling, 0 replies; 9+ messages in thread
From: Cyrill Gorcunov @ 2011-11-09 16:14 UTC (permalink / raw)
To: Sasha Levin, Richard Weinberger, penberg, kvm, mingo, asias.hejun
On Wed, Nov 09, 2011 at 08:00:06PM +0400, Cyrill Gorcunov wrote:
...
> >
> > You'll need CONFIG_KVM_CLOCK.
> >
> > I'm not actually sure how close our implementation is to having tsc
> > working so far, Cyrill knows more about that than me.
> >
>
> We dropped tsc while were debuggin timer interrupts and apic routing
> setup, it might be not needed already. (Still to be fair I'm not sure
> does kvm hypervisor has a control bit set for tsc and cause or not vm-exit).
>
> In short -- you could drop this from command line and tell us how it goes ;)
>
The history shows the following commit
| commit 513fa5b4ccba8f9a2270a4f5262433071456540b
| Author: Pekka Enberg <penberg@cs.helsinki.fi>
| Date: Sun Apr 11 20:55:56 2010 +0300
|
| kvm: Force 'notsc' and 'earlyprintk' kernel parameters
|
| We don't support TSC calibration properly and we want early printk so force
| them as kernel parameters.
|
| Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
and as far as I remember it's because we were stuck at apic calibration,
but now we have an apic from kvm hypervisor so I think it's safe to drop it
now (but still should be tested more widely).
Cyrill
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 16:00 ` Cyrill Gorcunov
2011-11-09 16:14 ` Cyrill Gorcunov
@ 2011-11-09 18:56 ` Richard Weinberger
2011-11-09 19:13 ` Pekka Enberg
1 sibling, 1 reply; 9+ messages in thread
From: Richard Weinberger @ 2011-11-09 18:56 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: Sasha Levin, penberg, kvm, mingo, asias.hejun
On Wed, 9 Nov 2011 20:00:06 +0400, Cyrill Gorcunov <gorcunov@gmail.com>
wrote:
> On Wed, Nov 09, 2011 at 05:49:53PM +0200, Sasha Levin wrote:
>> On Wed, 2011-11-09 at 17:42 +0200, Richard Weinberger wrote:
>> > On Wed, 09 Nov 2011 16:49:51 +0200, Sasha Levin
>> > <levinsasha928@gmail.com> wrote:
>> > > We'll do kvm_clock as well if you compile it in the kernel.
>> >
>> > CONFIG_HIGH_RES_TIMERS is on both host and guest kernels enabled.
>> > BTW: Why adds the kvm tool "notsc" to the guest's kernel command line?
>>
>> You'll need CONFIG_KVM_CLOCK.
Ups, thanks for the hint!
>
> In short -- you could drop this from command line and tell us how it goes ;)
>
So far it works fine. :-)
Thanks,
//richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 18:56 ` Richard Weinberger
@ 2011-11-09 19:13 ` Pekka Enberg
2011-11-09 19:25 ` Cyrill Gorcunov
0 siblings, 1 reply; 9+ messages in thread
From: Pekka Enberg @ 2011-11-09 19:13 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Cyrill Gorcunov, Sasha Levin, kvm, mingo, asias.hejun
On Wed, 2011-11-09 at 20:56 +0200, Richard Weinberger wrote:
> On Wed, 9 Nov 2011 20:00:06 +0400, Cyrill Gorcunov <gorcunov@gmail.com>
> wrote:
> > On Wed, Nov 09, 2011 at 05:49:53PM +0200, Sasha Levin wrote:
> >> On Wed, 2011-11-09 at 17:42 +0200, Richard Weinberger wrote:
> >> > On Wed, 09 Nov 2011 16:49:51 +0200, Sasha Levin
> >> > <levinsasha928@gmail.com> wrote:
> >> > > We'll do kvm_clock as well if you compile it in the kernel.
> >> >
> >> > CONFIG_HIGH_RES_TIMERS is on both host and guest kernels enabled.
> >> > BTW: Why adds the kvm tool "notsc" to the guest's kernel command line?
> >>
> >> You'll need CONFIG_KVM_CLOCK.
>
> Ups, thanks for the hint!
>
> >
> > In short -- you could drop this from command line and tell us how it goes ;)
>
> So far it works fine. :-)
Yup, "notsc" was used in the early days to avoid APIC emulation.
Anyone care to send a patch to drop it from master?
Pekka
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: kvm tools: clock sources for hrtimer
2011-11-09 19:13 ` Pekka Enberg
@ 2011-11-09 19:25 ` Cyrill Gorcunov
0 siblings, 0 replies; 9+ messages in thread
From: Cyrill Gorcunov @ 2011-11-09 19:25 UTC (permalink / raw)
To: Pekka Enberg; +Cc: Richard Weinberger, Sasha Levin, kvm, mingo, asias.hejun
On Wed, Nov 09, 2011 at 09:13:54PM +0200, Pekka Enberg wrote:
...
> Yup, "notsc" was used in the early days to avoid APIC emulation.
>
> Anyone care to send a patch to drop it from master?
>
> Pekka
>
Here we go
---
Subject: [PATCH] tools, kvm: Drop "notsc" no longer needed kernel option
"notsc" option has been used to avoid APIC calibration
problem at early days when we didn't support APIC at all.
Now with KVM APIC emulation used there is no longer need
for this option. Drop it.
Reported-by: Richard Weinberger <richard@nod.at>
Tested-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
tools/kvm/builtin-run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.git/tools/kvm/builtin-run.c
===================================================================
--- linux-2.6.git.orig/tools/kvm/builtin-run.c
+++ linux-2.6.git/tools/kvm/builtin-run.c
@@ -830,7 +830,7 @@ int kvm_cmd_run(int argc, const char **a
vidmode = 0;
memset(real_cmdline, 0, sizeof(real_cmdline));
- strcpy(real_cmdline, "notsc noapic noacpi pci=conf1 reboot=k panic=1 i8042.direct=1 "
+ strcpy(real_cmdline, "noapic noacpi pci=conf1 reboot=k panic=1 i8042.direct=1 "
"i8042.dumbkbd=1 i8042.nopnp=1");
if (vnc || sdl) {
strcat(real_cmdline, " video=vesafb console=tty0");
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-11-09 19:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 14:27 kvm tools: clock sources for hrtimer Richard Weinberger
2011-11-09 14:49 ` Sasha Levin
2011-11-09 15:42 ` Richard Weinberger
2011-11-09 15:49 ` Sasha Levin
2011-11-09 16:00 ` Cyrill Gorcunov
2011-11-09 16:14 ` Cyrill Gorcunov
2011-11-09 18:56 ` Richard Weinberger
2011-11-09 19:13 ` Pekka Enberg
2011-11-09 19:25 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox