Re: [RFC] Paravirt timer for KVM

Glauber de Oliveira Costa
2007-10-16T01:26:25Z

On 10/15/07, Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> (This mail was sent off-list, so I'll do the same.)

Oh, I'm sorry Hollis, after so many mails, I've hit the reply key
instead of the reply to all one ;-)

I'm moving it to the list again, where it belongs.

> On Mon, 2007-10-15 at 14:29 -0300, Glauber de Oliveira Costa wrote:
> > >
> > > I must have missed earlier discussion on this topic, so I'm left
> > > wondering... what's the point? What's wrong with PIT (et al) emulation?
> > >
> > Well, my reasons are:
> >
> > * Steal time (despite the fact I've not addressed in this patch. But
> > c'mon guys, one thing at a time! ;-))
>
> Yes, I agree this is important, but I'm not sure you need a new time
> source to do that.

And how would you do it ?

Only the host knows how much time you spent not running. So you either
have an alternate clocksource, or goes tell the device about it. Which
yeah, may be more general, but it is quite cumbersome, IMHO.

> > * Performance: Although I've not measured it (for hpet we'd have to
> > have an implementation , in first place), I think that handling timer
> > events in the host might be more efficient than userspace exits for
> > pit emulation.
>
> Host emulation doesn't require guest paravirtualization.
>
> However, Avi makes a good point about the number of MMIO exits, and I've
> replied on-list.

Yes, this is what I meant.

> > * This is not exactly one that hurts me directly, but I saw come
> > complaints frome some people in kvm-devel saying that they needed to
> > run ntp in all the guests, and I felt sad for them. ;-) Paravirt
> > timers make this task easier, IMHO, although maybe something can be
> > done in the emulation layer for it.
>
> It's not clear to me that PV time would by itself solve any NTP issues.

host provides the guest with the idea of timing.

if the time in the host changes, the guest will get this update for free.

> To clarify, I'm not saying PV time is a bad idea. I'm just trying to
> understand why it's a good idea...

If you try to understand why it's a good idea, and I try to understand
why it's a bad idea, we'll hopefully come to a good middle ground, and
everybody wins ;-)

--
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."