From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Luis Vazquez Cao Subject: Re: Monotonic clock with KVM pv-clock Date: Mon, 20 Jan 2014 23:59:39 +0900 Message-ID: <52DD39DB.3040109@lab.ntt.co.jp> References: <20140120095656.GA1282@fermat.math.technion.ac.il> <20140120133317.GA7509@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marcelo Tosatti , "Nadav Har'El" Return-path: Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]:50214 "EHLO tama50.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751669AbaATO74 (ORCPT ); Mon, 20 Jan 2014 09:59:56 -0500 In-Reply-To: <20140120133317.GA7509@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: (2014/01/20 22:33), Marcelo Tosatti wrote: > On Mon, Jan 20, 2014 at 11:56:56AM +0200, Nadav Har'El wrote: >> If KVM_SYSTEM_TIME is not a correct way to get a monotonic paravirtual clock >> from KVM, is there a correct way? > Inside a Linux guest? Can use sched_clock(). I would like to mention that Linux guests usually do not use sched_clock() directly. The reason being that the kvm_clock based sched_clock() is not marked stable (sched_clock_stable is 0), which means that the pair of wrappers sched_clock_local()/sched_clock_remote() is used instead.