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-changelog

[Xen-changelog] [linux-2.6.18-xen] linux/x86: Use cpu_relax() rather tha

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/x86: Use cpu_relax() rather than barrier() in smp_call_function()
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 07 Dec 2007 08:20:30 -0800
Delivery-date: Fri, 07 Dec 2007 08:22:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196956971 0
# Node ID 3938ff4b3fc2e84518719bea706a412983155a2a
# Parent  d43906ea0e9c136e9ec28df30f94c225536d588c
linux/x86: Use cpu_relax() rather than barrier() in smp_call_function()

Short of getting an explanation for the odd difference to native, make
the code match native (and also, in the case of x86-64,
__smp_call_function_single()).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/kernel/smp-xen.c   |    4 ++--
 arch/x86_64/kernel/smp-xen.c |    8 --------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff -r d43906ea0e9c -r 3938ff4b3fc2 arch/i386/kernel/smp-xen.c
--- a/arch/i386/kernel/smp-xen.c        Thu Dec 06 15:59:52 2007 +0000
+++ b/arch/i386/kernel/smp-xen.c        Thu Dec 06 16:02:51 2007 +0000
@@ -525,11 +525,11 @@ int smp_call_function (void (*func) (voi
 
        /* Wait for response */
        while (atomic_read(&data.started) != cpus)
-               barrier();
+               cpu_relax();
 
        if (wait)
                while (atomic_read(&data.finished) != cpus)
-                       barrier();
+                       cpu_relax();
        spin_unlock(&call_lock);
 
        return 0;
diff -r d43906ea0e9c -r 3938ff4b3fc2 arch/x86_64/kernel/smp-xen.c
--- a/arch/x86_64/kernel/smp-xen.c      Thu Dec 06 15:59:52 2007 +0000
+++ b/arch/x86_64/kernel/smp-xen.c      Thu Dec 06 16:02:51 2007 +0000
@@ -421,21 +421,13 @@ static void __smp_call_function (void (*
 
        /* Wait for response */
        while (atomic_read(&data.started) != cpus)
-#ifndef CONFIG_XEN
                cpu_relax();
-#else
-               barrier();
-#endif
 
        if (!wait)
                return;
 
        while (atomic_read(&data.finished) != cpus)
-#ifndef CONFIG_XEN
                cpu_relax();
-#else
-               barrier();
-#endif
 }
 
 /*

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/x86: Use cpu_relax() rather than barrier() in smp_call_function(), Xen patchbot-linux-2.6.18-xen <=