WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] x86: adjust placement of pause insn in _raw_spin

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: adjust placement of pause insn in _raw_spin_lock()
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 08 Aug 2008 14:12:41 +0100
Cc:
Delivery-date: Fri, 08 Aug 2008 06:13:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <489C5CE1.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acj5WG/ormbFmmVLEd2xugAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] x86: adjust placement of pause insn in _raw_spin_lock()
User-agent: Microsoft-Entourage/11.4.0.080122
Why?

 -- Keir

On 8/8/08 13:49, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
> 
> Index: 2008-08-06/xen/include/asm-x86/spinlock.h
> ===================================================================
> --- 2008-08-06.orig/xen/include/asm-x86/spinlock.h 2007-09-10
> 09:59:37.000000000 +0200
> +++ 2008-08-06/xen/include/asm-x86/spinlock.h 2008-08-07 12:36:13.000000000
> +0200
> @@ -23,8 +23,8 @@ static inline void _raw_spin_lock(spinlo
>          "1:  lock; decb %0         \n"
>          "    js 2f                 \n"
>          ".section .text.lock,\"ax\"\n"
> -        "2:  cmpb $0,%0            \n"
> -        "    rep; nop              \n"
> +        "2:  rep; nop              \n"
> +        "    cmpb $0,%0            \n"
>          "    jle 2b                \n"
>          "    jmp 1b                \n"
>          ".previous"
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel