From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755906AbaLWKZU (ORCPT ); Tue, 23 Dec 2014 05:25:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48157 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754844AbaLWKZS (ORCPT ); Tue, 23 Dec 2014 05:25:18 -0500 Message-ID: <54994304.1060808@redhat.com> Date: Tue, 23 Dec 2014 11:25:08 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Santosh Shukla CC: Andy Lutomirski , Marcelo Tosatti , Gleb Natapov , kvm list , "linux-kernel@vger.kernel.org" Subject: Re: Cleaning up the KVM clock References: <20141222133430.GA23631@amt.cnet> <54989FF0.3090300@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/12/2014 11:23, Santosh Shukla wrote: > > > No. kvm_guest_time_update is called by vcpu_enter_guest, while the vCPU > is not running, so it's entirely atomic from the point of view of > the guest. > > > Then checking odd value for version field (at guest side: function > pvclock_clocksource_read / pvclock_read_flag) is redundant considering > that kvm_guest_time_update incremented by 2. The code is common to Xen and KVM. Xen uses seqlock semantics. The cost of one AND is not detectable. Paolo