qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] kvmclock: Ensure time in migration never goes b


From: Marcelo Tosatti
Subject: Re: [Qemu-devel] [PATCH] kvmclock: Ensure time in migration never goes backward
Date: Thu, 8 May 2014 23:28:31 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, May 08, 2014 at 09:21:29AM +0200, Alexander Graf wrote:
> 
> On 08.05.14 03:33, Marcelo Tosatti wrote:
> >On Mon, May 05, 2014 at 03:51:22PM +0200, Alexander Graf wrote:
> >>When we migrate we ask the kernel about its current belief on what the guest
> >>time would be. However, I've seen cases where the kvmclock guest structure
> >>indicates a time more recent than the kvm returned time.
> >>
> >>To make sure we never go backwards, calculate what the guest would have seen
> >>as time at the point of migration and use that value instead of the kernel
> >>returned one when it's more recent.
> >>
> >>While this doesn't fix the underlying issue that the kernel's view of time
> >>is skewed, it allows us to safely migrate guests even from sources that are
> >>known broken.
> >>
> >>Signed-off-by: Alexander Graf <address@hidden>
> >OK Alexander better move this logic to the kernel, in KVM_GET_CLOCK.
> >
> >Otherwise every user of KVM_GET_CLOCK would have to apply the
> >workaround.
> 
> Well, the breakage occurs on the *source* of things. So if I have
> 100 VMs running, I'm pretty sure one of them gets hit by this bug.
> 
> If I put the workaround in the kernel, I have to take the chance to
> break some of those 100 VMs to get things rolling. If I put it in
> QEMU, I can live with a broken migration source.
> 
> This gets even worse when you want to phase out unfixed host kernels.
> 
> 
> Alex

Alex,

Unability to upgrade systems is not an excuse to fix the bug in the
wrong place. 

I'll send a kernel patch.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]