From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753163AbcFVQO2 (ORCPT ); Wed, 22 Jun 2016 12:14:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44139 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752862AbcFVQOZ (ORCPT ); Wed, 22 Jun 2016 12:14:25 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <7d1c236f-80d1-2c58-be0e-6676769636b3@zytor.com> References: <7d1c236f-80d1-2c58-be0e-6676769636b3@zytor.com> <5e5b99d7-c739-9743-b3e0-fbe0636d6dee@zytor.com> <40fd5f74-190e-b805-fbaa-f84899190fbc@zytor.com> <20160615085002.GC30935@twins.programming.kicks-ass.net> <4467.1466499980@warthog.procyon.org.uk> <559ea507-b3cb-74e0-7816-26bb8cbc0238@zytor.com> To: "H. Peter Anvin" Cc: dhowells@redhat.com, Peter Zijlstra , Linux Kernel Mailing List , linux-arch , Linus Torvalds , Ingo Molnar , Thomas Gleixner Subject: Re: cmpxchg and x86 flags output MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16405.1466612063.1@warthog.procyon.org.uk> Date: Wed, 22 Jun 2016 17:14:23 +0100 Message-ID: <16406.1466612063@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Jun 2016 16:14:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org H. Peter Anvin wrote: > So how do we make this move forward? Getting my API additions in is relatively straightforward, I think. The whether-or-notness of the cmpxchg operation succeeding can be calculated by comparing the original value read from memory with the value-to-be-replaced inside the API function. This can later be replaced with the boolean output from the CMPXCHG instruction, the branch target from the LL/SC skipping or the result of the intrinsics. David