[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] 答复: [PATCH]xen new latest version mp_register_lapic can't register disabled CPU, patch attempt to fix



I payed attention to the appearance, beause my host start and trigger the 
following code and printk logs
printk("%sAPIC ID %#x and/or ACPI ID %#x beyond limit"
                       " - processor ignored\n",
                       processor->lapic_flags & ACPI_MADT_ENABLED ?
                                KERN_WARNING "WARNING: " : KERN_INFO,
                       processor->local_apic_id, processor->uid);


after refered to the below comment in function acpi_parse_x2apic of xen latest 
version 
/*
         * We need to register disabled CPU as well to permit
         * counting disabled CPUs. This allows us to size
         * cpus_possible_map more accurately, to permit
         * to not preallocating memory for all NR_CPUS
         * when we use CPU hotplug.
         */
        mp_register_lapic(processor->local_apic_id, enabled, 0);


and compared with linux4.1 function acpi_parse_x2apic,
this patch will be useful if xen host support CPU hotplug in the future,






-----邮件原件-----
发件人: Jan Beulich [mailto:JBeulich@xxxxxxxx] 
发送时间: 2015年7月7日 15:54
收件人: Fanhenglong
抄送: Hanweidong (Randy); Huangpeng (Peter); Yanqiangjun; xen-devel@xxxxxxxxxxxxx
主题: Re: [Xen-devel] [PATCH]xen new latest version mp_register_lapic can't 
register disabled CPU, patch attempt to fix

>>> On 07.07.15 at 01:52, <fanhenglong@xxxxxxxxxx> wrote:
> When xen booted up and parsed all cpus by acpi_parse_x2apic,
> 
> if the number of "Processor Local x2APIC Structure"(struct
> acpi_madt_local_x2apic) parsed from acpi table bigger than the number 
>of host  cpu.
> for all extra acpi_madt_local_x2apic structure,  struct 
>acpi_madt_local_x2apic {
>          struct acpi_subtable_header header;
>          u16 reserved;           /* Reserved - must be zero */
>          u32 local_apic_id;    /* Processor x2APIC ID  */
>          u32 lapic_flags;
>          u32 uid;             /* ACPI processor UID */
> };
> member local_apic_id has default value FFFFFFFF.
>[...]
> based on the above code, "processor->local_apic_id >= 
>MAX_APICS"(line:103) and  return ,caused each disabled CPU can't be registered.

But you fail to explain why you think these processors need to be registered. 
They're disabled after all.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.