From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759706Ab0LNRCM (ORCPT ); Tue, 14 Dec 2010 12:02:12 -0500 Received: from terminus.zytor.com ([198.137.202.10]:40063 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759353Ab0LNRCL (ORCPT ); Tue, 14 Dec 2010 12:02:11 -0500 Message-ID: <4D07A2B7.8080405@zytor.com> Date: Tue, 14 Dec 2010 09:00:39 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Thunderbird/3.1.6 MIME-Version: 1.0 To: Christoph Lameter CC: Eric Dumazet , Tejun Heo , akpm@linux-foundation.org, Pekka Enberg , linux-kernel@vger.kernel.org, Mathieu Desnoyers Subject: Re: [cpuops cmpxchg V2 5/5] cpuops: Use cmpxchg for xchg to avoid lock semantics References: <20101214162842.542421046@linux.com> <20101214162855.392020353@linux.com> <1292345072.5934.32.camel@edumazet-laptop> 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 12/14/2010 08:55 AM, Christoph Lameter wrote: > > We do not need to reload the value as pointed out by Eric. It is already in > the correct register so just rerun the cmpxchg without the load. > > Signed-off-by: Christoph Lameter > Is it genuinely faster to do the pre-load mov, or can we drop that too? My guess would be that yes it is, but if it happens not to be it would be nice to reduce the code size. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.