From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753559AbcFLLqz (ORCPT ); Sun, 12 Jun 2016 07:46:55 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:32770 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753317AbcFLLqy (ORCPT ); Sun, 12 Jun 2016 07:46:54 -0400 Date: Sun, 12 Jun 2016 19:46:47 +0800 From: Minfei Huang To: Borislav Petkov Cc: Paolo Bonzini , luto@kernel.org, hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3 V2] pvclock: Get rid of __pvclock_read_cycles in function pvclock_read_flags Message-ID: <20160612114643.GA24066@localhost> References: <1464329832-4638-3-git-send-email-mnghuan@gmail.com> <1464438463-8485-1-git-send-email-mnghuan@gmail.com> <20160608081739.GD26187@pd.tnic> <1ade9d3e-2064-c811-f718-371d91c7874c@redhat.com> <20160609112807.GB12860@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160609112807.GB12860@pd.tnic> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/09/16 at 01:28P, Borislav Petkov wrote: > On Thu, Jun 09, 2016 at 01:21:18PM +0200, Paolo Bonzini wrote: > > This is basically implementing a seqcount. It needs two barriers and, > > Why does it need the two barriers? More details please. Hi, Borislav. It's a seqcount-like. We should confirm that reading flags occurs between two reading version. To make complier do not reorder, two barriers are necessary. Thanks Minfei