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] [xen-unstable] [LINUX] Oney 'nosmp' and 'max_cpus=' comm

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] Oney 'nosmp' and 'max_cpus=' command line options.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Aug 2006 19:20:23 +0000
Delivery-date: Mon, 14 Aug 2006 12:23:59 -0700
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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID c09d6e997f058a826174c17d040576898dcab110
# Parent  f8c53e937b30d1826d56f2923db6edd8d6d52e52
[LINUX] Oney 'nosmp' and 'max_cpus=' command line options.
Based on a patch from Jan Beulich.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/core/smpboot.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -r f8c53e937b30 -r c09d6e997f05 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Mon Aug 14 15:26:37 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Mon Aug 14 16:12:43 
2006 +0100
@@ -255,7 +255,14 @@ void __init smp_prepare_cpus(unsigned in
 
        xen_smp_intr_init(0);
 
-       for_each_cpu_mask (cpu, cpu_possible_map) {
+       /* Restrict the possible_map according to max_cpus. */
+       while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
+               for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--)
+                       continue;
+               cpu_clear(cpu, cpu_possible_map);
+       }
+
+       for_each_cpu (cpu) {
                if (cpu == 0)
                        continue;
 
@@ -266,7 +273,8 @@ void __init smp_prepare_cpus(unsigned in
 #endif
                gdt_descr->address = get_zeroed_page(GFP_KERNEL);
                if (unlikely(!gdt_descr->address)) {
-                       printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu);
+                       printk(KERN_CRIT "CPU%d failed to allocate GDT\n",
+                              cpu);
                        continue;
                }
                gdt_descr->size = GDT_SIZE;
@@ -305,12 +313,6 @@ void __init smp_prepare_cpus(unsigned in
 
        init_xenbus_allowed_cpumask();
 
-       /* Currently, Xen gives no dynamic NUMA/HT info. */
-       for (cpu = 1; cpu < NR_CPUS; cpu++) {
-               cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
-               cpu_core_map[cpu]    = cpumask_of_cpu(cpu);
-       }
-
 #ifdef CONFIG_X86_IO_APIC
        /*
         * Here we can be sure that there is an IO-APIC in the system. Let's

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LINUX] Oney 'nosmp' and 'max_cpus=' command line options., Xen patchbot-unstable <=