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-4.1-testing] x86: fix cpu_sibling_map initializatio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] x86: fix cpu_sibling_map initialization when topology CPUID leaf is present
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Fri, 18 Mar 2011 21:25:10 +0000
Delivery-date: Fri, 18 Mar 2011 14:26:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1300122480 0
# Node ID 9175944daf4891ab9b1914dc562e9da30664cad4
# Parent  5dda35f1f32f0b6be4ce321b0e028ee1a2af29ea
x86: fix cpu_sibling_map initialization when topology CPUID leaf is present

c/s 21811:12f0618400de broke this by not properly initializing struct
cpuinfo_x86's x86_num_siblings member (other than Linux, where this is
a global variable, it is being maintained per CPU by Xen).

Hyper-threaded CPUs with CPUID leaf 0xb present had therefore all
cpu_sibling_map-s with just a single bit set, thus improperly feeding
the scheduler.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
xen-unstable changeset:   23037:a29b35408950
xen-unstable date:        Mon Mar 14 17:05:21 2011 +0000
---


diff -r 5dda35f1f32f -r 9175944daf48 xen/arch/x86/cpu/common.c
--- a/xen/arch/x86/cpu/common.c Mon Mar 14 17:07:29 2011 +0000
+++ b/xen/arch/x86/cpu/common.c Mon Mar 14 17:08:00 2011 +0000
@@ -512,7 +512,7 @@
 {
        unsigned int eax, ebx, ecx, edx, sub_index;
        unsigned int ht_mask_width, core_plus_mask_width;
-       unsigned int core_select_mask, core_level_siblings, smp_num_siblings;
+       unsigned int core_select_mask, core_level_siblings;
        unsigned int initial_apicid;
        int cpu = smp_processor_id();
 
@@ -530,7 +530,7 @@
        initial_apicid = edx;
 
        /* Populate HT related information from sub-leaf level 0 */
-       core_level_siblings = smp_num_siblings = LEVEL_MAX_SIBLINGS(ebx);
+       core_level_siblings = c->x86_num_siblings = LEVEL_MAX_SIBLINGS(ebx);
        core_plus_mask_width = ht_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
 
        sub_index = 1;
@@ -554,7 +554,7 @@
        phys_proc_id[cpu] = phys_pkg_id(initial_apicid, core_plus_mask_width);
 
        c->apicid = phys_pkg_id(initial_apicid, 0);
-       c->x86_max_cores = (core_level_siblings / smp_num_siblings);
+       c->x86_max_cores = (core_level_siblings / c->x86_num_siblings);
 
        if ( opt_cpu_info )
        {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] x86: fix cpu_sibling_map initialization when topology CPUID leaf is present, Xen patchbot-4 . 1-testing <=