From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752808AbbESCCu (ORCPT ); Mon, 18 May 2015 22:02:50 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:23977 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbbESCCr (ORCPT ); Mon, 18 May 2015 22:02:47 -0400 Message-ID: <555A99C1.6090300@oracle.com> Date: Mon, 18 May 2015 22:02:41 -0400 From: Sasha Levin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Marcelo Tosatti CC: KVM General , LKML , Paolo Bonzini , lcapitulino@redhat.com Subject: Re: kvm: odd time values since "kvmclock: set scheduler clock stable" References: <55528A04.2060404@oracle.com> <20150518223936.GA4486@amt.cnet> <555A79A5.608@oracle.com> <20150519001331.GA15517@amt.cnet> In-Reply-To: <20150519001331.GA15517@amt.cnet> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18/2015 08:13 PM, Marcelo Tosatti wrote: > GOn Mon, May 18, 2015 at 07:45:41PM -0400, Sasha Levin wrote: >> > On 05/18/2015 06:39 PM, Marcelo Tosatti wrote: >>> > > On Tue, May 12, 2015 at 07:17:24PM -0400, Sasha Levin wrote: >>>> > >> Hi all, >>>> > >> >>>> > >> I'm seeing odd jump in time values during boot of a KVM guest: >>>> > >> >>>> > >> [...] >>>> > >> [ 0.000000] tsc: Detected 2260.998 MHz processor >>>> > >> [3376355.247558] Calibrating delay loop (skipped) preset value.. >>>> > >> [...] >>>> > >> >>>> > >> I've bisected it to: >>> > > >>> > > Paolo, Sasha, >>> > > >>> > > Although this might seem undesirable, there is no requirement >>> > > for sched_clock to initialize at 0: >>> > > >>> > > " >>> > > * >>> > > * There is no strict promise about the base, although it tends to start >>> > > * at 0 on boot (but people really shouldn't rely on that). >>> > > * >>> > > " >>> > > >>> > > Sasha, are you seeing any problem other than the apparent time jump? >> > >> > Nope, but I've looked at it again and it seems that it jumps to the host's >> > clock (that is, in the example above the 3376355 value was the host's clock >> > value). >> > >> > >> > Thanks, >> > Sasha > Sasha, thats right. Its the host monotonic clock. It's worth figuring out if (what) userspace breaks on that. I know it says that you shouldn't rely on that, but I'd happily place a bet on at least one userspace treating it as "seconds since boot" or something similar. Thanks, Sasha