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/
Home Products Support Community News


[Xen-devel] [PATCH] No cpu_add_remove_lock in do_boot_cpu

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] No cpu_add_remove_lock in do_boot_cpu
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Mon, 22 Mar 2010 14:23:23 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 21 Mar 2010 23:27:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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: AcrJiCzY1ty/e+ZFR8mfBCJQzGTGYA==
Thread-topic: [PATCH] No cpu_add_remove_lock in do_boot_cpu
No cpu_add_remove_lock in do_boot_cpu.

The do_boot_cpu() will be called when system booting or CPU online. When system 
booting, we don't need hold this lock. When system online, the lock is held 
already by cpu_up.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>

diff -r c1f272c3a441 xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Mon Mar 15 17:08:29 2010 +0000
+++ b/xen/arch/x86/smpboot.c    Thu Mar 18 15:46:12 2010 +0800
@@ -984,10 +984,8 @@ static int __devinit do_boot_cpu(int api
                /* Mark the CPU as non-present */
-               spin_lock(&cpu_add_remove_lock);
                x86_cpu_to_apicid[cpu] = BAD_APICID;
                cpu_clear(cpu, cpu_present_map);
-               spin_unlock(&cpu_add_remove_lock);
        } else {

Attachment: bootcpu_lock.patch
Description: bootcpu_lock.patch

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] No cpu_add_remove_lock in do_boot_cpu, Jiang, Yunhong <=