From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 2/5] tools: add routine to get CMT L3 event mask Date: Wed, 7 Jan 2015 17:04:38 +0000 Message-ID: <1420650278.18631.129.camel@citrix.com> References: <1420629125-17725-1-git-send-email-chao.p.peng@linux.intel.com> <1420629125-17725-3-git-send-email-chao.p.peng@linux.intel.com> <54AD1825.1060800@citrix.com> <21677.24788.869267.896079@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21677.24788.869267.896079@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com, Andrew Cooper , xen-devel@lists.xen.org, JBeulich@suse.com, Chao Peng , keir@xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-01-07 at 16:37 +0000, Ian Jackson wrote: > > As the result of the hypercall is going to be the same, the > > worse that a race could achieve is a wasted hypercall. > > This kind of analysis is unfounded in the presence of modern compilers > with aggressive optimisations. At the very least, if you're going to > do some caching like this, it needs a lock around it. Even for a hypercall which is just "return 42" (at least between boots)? Ian.