Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-19 Thread Avi Kivity
On 09/19/2012 07:55 PM, Gleb Natapov wrote: > On Wed, Sep 19, 2012 at 07:44:27PM +0300, Avi Kivity wrote: >> On 09/19/2012 07:37 PM, Gleb Natapov wrote: >> > On Wed, Sep 19, 2012 at 06:34:46PM +0300, Avi Kivity wrote: >> >> On 09/16/2012 05:37 PM, Anthony Liguori wrote: >> >> > Avi Kivity writes:

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-19 Thread Gleb Natapov
On Wed, Sep 19, 2012 at 07:44:27PM +0300, Avi Kivity wrote: > On 09/19/2012 07:37 PM, Gleb Natapov wrote: > > On Wed, Sep 19, 2012 at 06:34:46PM +0300, Avi Kivity wrote: > >> On 09/16/2012 05:37 PM, Anthony Liguori wrote: > >> > Avi Kivity writes: > >> > > >> >> On 09/13/2012 09:27 PM, Anthony Li

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-19 Thread Avi Kivity
On 09/19/2012 07:37 PM, Gleb Natapov wrote: > On Wed, Sep 19, 2012 at 06:34:46PM +0300, Avi Kivity wrote: >> On 09/16/2012 05:37 PM, Anthony Liguori wrote: >> > Avi Kivity writes: >> > >> >> On 09/13/2012 09:27 PM, Anthony Liguori wrote: >> >>> If there was a better/equivalent solution that didn'

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-19 Thread Gleb Natapov
On Wed, Sep 19, 2012 at 06:34:46PM +0300, Avi Kivity wrote: > On 09/16/2012 05:37 PM, Anthony Liguori wrote: > > Avi Kivity writes: > > > >> On 09/13/2012 09:27 PM, Anthony Liguori wrote: > >>> If there was a better/equivalent solution that didn't depend on qemu-ga, > >>> I'd be all for it. But

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-19 Thread Avi Kivity
On 09/16/2012 05:37 PM, Anthony Liguori wrote: > Avi Kivity writes: > >> On 09/13/2012 09:27 PM, Anthony Liguori wrote: >>> If there was a better/equivalent solution that didn't depend on qemu-ga, >>> I'd be all for it. But there isn't AFAICT. >> >> Perhaps there is. We fixed the problem for Li

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-16 Thread Anthony Liguori
Avi Kivity writes: > On 09/13/2012 09:27 PM, Anthony Liguori wrote: >> If there was a better/equivalent solution that didn't depend on qemu-ga, >> I'd be all for it. But there isn't AFAICT. > > Perhaps there is. We fixed the problem for Linux by adding kvmclock and > backporting it to distros t

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-16 Thread Avi Kivity
On 09/13/2012 09:27 PM, Anthony Liguori wrote: >>> >>> Plus, there's a whole variety of other features enabled once we can >>> assume qemu-ga is available. It's worth solving that problem. >> >> We can't assume it. Too many OSes exist, too many guests are already >> exist and ain't broken, too m

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: >> That's a bug. >> >> The next period calculation should not be based on the last period + >> length of period but rather on the current time + delta to next period >> boundary. >> > I disagree that this is a bug. This is by design to account for timer > signals that was d

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 01:33:31PM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Thu, Sep 13, 2012 at 10:56:56AM -0500, Anthony Liguori wrote: > >> Gleb Natapov writes: > >> > >> > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: > >> >> Gleb Natapov writes: > >

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: > On Thu, Sep 13, 2012 at 10:56:56AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: >> >> Gleb Natapov writes: >> >> >> >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >>

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Avi Kivity writes: > On 09/13/2012 06:50 PM, Anthony Liguori wrote: > This may not work for really old server oriented guests. S3 requires guest cooperation, period. But so does qemu-ga. It's better than nothing, and we can't get perfection without guest cooperation. >

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Avi Kivity writes: > On 09/13/2012 05:42 PM, Eric Blake wrote: >> On 09/13/2012 08:34 AM, Avi Kivity wrote: >>> On 09/13/2012 05:22 PM, Gleb Natapov wrote: > > It's much easier for us to call into qemu-ga to do the time correction > whenever this event occurs than to try and have libv

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 05:48 PM, Gleb Natapov wrote: > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >> >> "Daniel P. Berrange" writes: >> >> >> >> I think it's better for QEMU to talk to

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 06:56 PM, Anthony Liguori wrote: >>> >> Hmm, true. What about hooking into suspend and doing vmstop during >> suspend. > > Is suspend the only foreseeable way for this problem to happen? I don't > think it is which is what concerns me about any approach that relies on > "hooking s

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 10:56:56AM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: > >> Gleb Natapov writes: > >> > >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: > >> >> "Daniel P. Berrange" wri

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >> >> "Daniel P. Berrange" writes: >> >> >> >> I think it's better for QEMU to talk to qemu-ga. We can tell

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 06:50 PM, Anthony Liguori wrote: >>> This may not work for really old server oriented guests. >>> >>> S3 requires guest cooperation, period. But so does qemu-ga. It's >>> better than nothing, and we can't get perfection without guest cooperation. >> >> qemu-ga requires either

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 05:42 PM, Eric Blake wrote: > On 09/13/2012 08:34 AM, Avi Kivity wrote: >> On 09/13/2012 05:22 PM, Gleb Natapov wrote: It's much easier for us to call into qemu-ga to do the time correction whenever this event occurs than to try and have libvirt figure out when it'

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: > >> "Daniel P. Berrange" writes: > >> > >> I think it's better for QEMU to talk to qemu-ga. We can tell when a large > >> period of ti

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Eric Blake
On 09/13/2012 08:34 AM, Avi Kivity wrote: > On 09/13/2012 05:22 PM, Gleb Natapov wrote: >>> >>> It's much easier for us to call into qemu-ga to do the time correction >>> whenever this event occurs than to try and have libvirt figure out when >>> it's necessary. > >> And if guest does not have qem

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >> "Daniel P. Berrange" writes: >> >> I think it's better for QEMU to talk to qemu-ga. We can tell when a large >> period of time has passed in QEMU because we'll accumulate a large >> number of missed tick

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 05:22 PM, Gleb Natapov wrote: >> >> It's much easier for us to call into qemu-ga to do the time correction >> whenever this event occurs than to try and have libvirt figure out when >> it's necessary. > And if guest does not have qemu-ga what is better inject interrupts like > crazy

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: > "Daniel P. Berrange" writes: > > > On Thu, Sep 13, 2012 at 07:14:08AM -0600, Eric Blake wrote: > >> On 09/13/2012 04:49 AM, Gleb Natapov wrote: > >> >> They do if you hibernate your laptop. > >> >> > >> > AFAIK libvirt migrates vm

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
"Daniel P. Berrange" writes: > On Thu, Sep 13, 2012 at 07:14:08AM -0600, Eric Blake wrote: >> On 09/13/2012 04:49 AM, Gleb Natapov wrote: >> >> They do if you hibernate your laptop. >> >> >> > AFAIK libvirt migrates vm into a file on hibernate. It is better to move >> > to S3 >> > (using qemu-ga

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 07:14:08AM -0600, Eric Blake wrote: > On 09/13/2012 04:49 AM, Gleb Natapov wrote: > >> They do if you hibernate your laptop. > >> > > AFAIK libvirt migrates vm into a file on hibernate. It is better to move to > > S3 > > (using qemu-ga) instead and migrate to file only if s

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Daniel P. Berrange
On Thu, Sep 13, 2012 at 07:14:08AM -0600, Eric Blake wrote: > On 09/13/2012 04:49 AM, Gleb Natapov wrote: > >> They do if you hibernate your laptop. > >> > > AFAIK libvirt migrates vm into a file on hibernate. It is better to move to > > S3 > > (using qemu-ga) instead and migrate to file only if s

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Eric Blake
On 09/13/2012 04:49 AM, Gleb Natapov wrote: >> They do if you hibernate your laptop. >> > AFAIK libvirt migrates vm into a file on hibernate. It is better to move to S3 > (using qemu-ga) instead and migrate to file only if s3 fails. On host hibernate, libvirt currently does nothing to the guest.

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 09:45:49PM +0200, Stefan Weil wrote: > Am 12.09.2012 20:13, schrieb Gleb Natapov: > >On Wed, Sep 12, 2012 at 07:30:08PM +0200, Stefan Weil wrote: > >>I also meant host hibernation. > >Than I don't see how guest can handle the situation since it has > >no idea that it was sto

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 01:19:17PM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Wed, Sep 12, 2012 at 08:54:26AM -0500, Anthony Liguori wrote: > >> > >> Hi, > >> > >> We've been running into a lot of problems lately with Windows guests and > >> I think they all ultimately could

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Paolo Bonzini
Il 12/09/2012 20:03, Clemens Kolbitsch ha scritto: > > not much that I can contribute to solving the problem, but I have a > bunch of VMs where this happens _every_ time I resume a snapshot (but > without hibernating). In case this could be a connected problem and > you need help testing a patch,

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Michael Roth
On Wed, Sep 12, 2012 at 07:30:08PM +0200, Stefan Weil wrote: > Am 12.09.2012 18:45, schrieb Gleb Natapov: > >On Wed, Sep 12, 2012 at 06:27:14PM +0200, Stefan Weil wrote: > >>Am 12.09.2012 15:54, schrieb Anthony Liguori: > >>>Hi, > >>> > >>>We've been running into a lot of problems lately with Windo

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Stefan Weil
Am 12.09.2012 20:13, schrieb Gleb Natapov: On Wed, Sep 12, 2012 at 07:30:08PM +0200, Stefan Weil wrote: I also meant host hibernation. Than I don't see how guest can handle the situation since it has no idea that it was stopped. Qemu has not idea about host hibernation either. The guest can c

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Anthony Liguori
Gleb Natapov writes: > On Wed, Sep 12, 2012 at 08:54:26AM -0500, Anthony Liguori wrote: >> >> Hi, >> >> We've been running into a lot of problems lately with Windows guests and >> I think they all ultimately could be addressed by revisiting the missed >> tick catchup algorithms that we use. Mi

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 07:30:08PM +0200, Stefan Weil wrote: > Am 12.09.2012 18:45, schrieb Gleb Natapov: > >On Wed, Sep 12, 2012 at 06:27:14PM +0200, Stefan Weil wrote: > >>Am 12.09.2012 15:54, schrieb Anthony Liguori: > >>>Hi, > >>> > >>>We've been running into a lot of problems lately with Windo

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Clemens Kolbitsch
> On 2012-09-12 15:54, Anthony Liguori wrote: >> >> Hi, >> >> We've been running into a lot of problems lately with Windows guests and >> I think they all ultimately could be addressed by revisiting the missed >> tick catchup algorithms that we use. Mike and I spent a while talking >> about it yes

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Stefan Weil
Am 12.09.2012 18:45, schrieb Gleb Natapov: On Wed, Sep 12, 2012 at 06:27:14PM +0200, Stefan Weil wrote: Am 12.09.2012 15:54, schrieb Anthony Liguori: Hi, We've been running into a lot of problems lately with Windows guests and I think they all ultimately could be addressed by revisiting the mi

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Luiz Capitulino
On Wed, 12 Sep 2012 08:54:26 -0500 Anthony Liguori wrote: > > Hi, > > We've been running into a lot of problems lately with Windows guests and > I think they all ultimately could be addressed by revisiting the missed > tick catchup algorithms that we use. Mike and I spent a while talking > abo

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 06:27:14PM +0200, Stefan Weil wrote: > Am 12.09.2012 15:54, schrieb Anthony Liguori: > > > >Hi, > > > >We've been running into a lot of problems lately with Windows guests and > >I think they all ultimately could be addressed by revisiting the missed > >tick catchup algorith

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Stefan Weil
Am 12.09.2012 15:54, schrieb Anthony Liguori: Hi, We've been running into a lot of problems lately with Windows guests and I think they all ultimately could be addressed by revisiting the missed tick catchup algorithms that we use. Mike and I spent a while talking about it yesterday and I want

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 06:06:47PM +0300, Gleb Natapov wrote: > On Wed, Sep 12, 2012 at 09:44:10AM -0500, Anthony Liguori wrote: > > Jan Kiszka writes: > > > > > On 2012-09-12 15:54, Anthony Liguori wrote: > > >> > > >> Hi, > > >> > > >> We've been running into a lot of problems lately with Win

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 05:42:58PM +0200, Jan Kiszka wrote: > On 2012-09-12 17:06, Gleb Natapov wrote: > Are there other issues with reinjection that people are aware of? Does > anything seem obviously wrong with the above? > >>> > >>> We should take the chance and design everything in a

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Jan Kiszka
On 2012-09-12 17:06, Gleb Natapov wrote: Are there other issues with reinjection that people are aware of? Does anything seem obviously wrong with the above? >>> >>> We should take the chance and design everything in a way that the HPET >>> can finally be (left) enabled. >> >> I thought

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 08:54:26AM -0500, Anthony Liguori wrote: > > Hi, > > We've been running into a lot of problems lately with Windows guests and > I think they all ultimately could be addressed by revisiting the missed > tick catchup algorithms that we use. Mike and I spent a while talking

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Gleb Natapov
On Wed, Sep 12, 2012 at 09:44:10AM -0500, Anthony Liguori wrote: > Jan Kiszka writes: > > > On 2012-09-12 15:54, Anthony Liguori wrote: > >> > >> Hi, > >> > >> We've been running into a lot of problems lately with Windows guests and > >> I think they all ultimately could be addressed by revisit

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Jan Kiszka
On 2012-09-12 16:44, Anthony Liguori wrote: > Jan Kiszka writes: > >> On 2012-09-12 15:54, Anthony Liguori wrote: >>> >>> Hi, >>> >>> We've been running into a lot of problems lately with Windows guests and >>> I think they all ultimately could be addressed by revisiting the missed >>> tick catch

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Anthony Liguori
Jan Kiszka writes: > On 2012-09-12 15:54, Anthony Liguori wrote: >> >> Hi, >> >> We've been running into a lot of problems lately with Windows guests and >> I think they all ultimately could be addressed by revisiting the missed >> tick catchup algorithms that we use. Mike and I spent a while

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Jan Kiszka
On 2012-09-12 15:54, Anthony Liguori wrote: > > Hi, > > We've been running into a lot of problems lately with Windows guests and > I think they all ultimately could be addressed by revisiting the missed > tick catchup algorithms that we use. Mike and I spent a while talking > about it yesterday

[Qemu-devel] Rethinking missed tick catchup

2012-09-12 Thread Anthony Liguori
Hi, We've been running into a lot of problems lately with Windows guests and I think they all ultimately could be addressed by revisiting the missed tick catchup algorithms that we use. Mike and I spent a while talking about it yesterday and I wanted to take the discussion to the list to get som