From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: What's kvmclock's custom sched_clock for? Date: Thu, 7 Jan 2016 08:56:47 -0200 Message-ID: <20160107105647.GA6741@amt.cnet> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Radim Krcmar , kvm list To: Andy Lutomirski Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47695 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032AbcAGLDY (ORCPT ); Thu, 7 Jan 2016 06:03:24 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jan 06, 2016 at 11:18:51PM -0800, Andy Lutomirski wrote: > AFAICT KVM reliably passes a monotonic TSC through to guests, It does not. > even if the host suspends. That's all that sched_clock needs, I think. > > So why does kvmclock have a custom sched_clock? Migration between hosts with different TSC frequencies. > On a related note, KVM doesn't pass the "invariant TSC" feature > through to guests on my machine even though "invtsc" is set in QEMU > and the kernel host code appears to support it. What gives? > > --Andy