From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752830AbcHLQeA (ORCPT ); Fri, 12 Aug 2016 12:34:00 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36305 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbcHLQd7 (ORCPT ); Fri, 12 Aug 2016 12:33:59 -0400 Subject: Re: [PATCH] time,virt: resync steal time when guest & host lose sync To: Rik van Riel , Wanpeng Li References: <1468421405-20056-1-git-send-email-fweisbec@gmail.com> <1468421405-20056-2-git-send-email-fweisbec@gmail.com> <1470751579.13905.77.camel@redhat.com> <20160810125212.78564dc2@annuminas.surriel.com> Cc: Frederic Weisbecker , Ingo Molnar , LKML , Peter Zijlstra , Wanpeng Li , Thomas Gleixner , Radim Krcmar , Mike Galbraith From: Paolo Bonzini Message-ID: Date: Fri, 12 Aug 2016 18:33:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160810125212.78564dc2@annuminas.surriel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/08/2016 18:52, Rik van Riel wrote: > Paolo, what is your opinion on this issue? > > I can think of all kinds of ways in which guest and host might lose > sync with steal time, from uninitialized values at boot, to guest > pause, followed by save to disk, and reload, to live migration, to... Guest and host _cannot_ lose sync because there is only one copy of the values. When the host wants to update the steal time value it just reads the old value and writes the new value. There cannot be a guest pause, save to disk, live migration or whatever between these two steps (and uninitialized values at boot are not how percpu values work). Your hypothesis of lost ticks makes the most sense to me, and then changing the argument to ULONG_MAX is the right thing to do. Paolo