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

[Xen-devel] RE: [PATCH][pvops_dom0][4/4] use physical acpi_id in acpi pr

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] RE: [PATCH][pvops_dom0][4/4] use physical acpi_id in acpi processor parsing logic
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Tue, 21 Jul 2009 16:07:14 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 21 Jul 2009 01:08:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A64D543.5080104@xxxxxxxx>
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>
References: <4D05DB80B95B23498C72C700BD6C2E0B2FBF198B@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4A64D543.5080104@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoJeb+H0h0ShXa4Q+2XCWazQHsQpQANglNQ
Thread-topic: [PATCH][pvops_dom0][4/4] use physical acpi_id in acpi processor parsing logic
>From: Jeremy Fitzhardinge [mailto:jeremy@xxxxxxxx]
>Sent: Tuesday, July 21, 2009 4:36 AM
>To: Yu, Ke
>Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; Tian, Kevin
>Subject: Re: [PATCH][pvops_dom0][4/4] use physical acpi_id in acpi processor
>parsing logic
>
>On 07/18/09 23:46, Yu, Ke wrote:
>> use physical acpi_id in acpi processor parsing logic
>>
>> xen domain0 is seeing vCPU, while xen need the acpi info of physical CPU,
>so this patch hack the acpi processor parsing logic to use physical acpi_id
>instead vcpu id
>>
>
>Would there be a problem with making this always use the acpi id?  That
>would get rid of the Xen-specific stuff, and makes logical sense (at
>least to me) since this code is dealing with APIC processor objects.

>
>I guess this goes back to my earlier comment; could this code be defined
>in terms of ACPI processors rather than general CPUs, so that the Xen
>(or any virtual) case can distinguish the two notions, while they can be
>mapped 1:1 for the native case?  (Or perhaps there are reasons you might
>want to have ACPI control processor power states which are logically
>offline to the kernel?)
>
>    J
>

To use acpi id in native, I can see there are at least two kind of conflicts 
need to be resolved: 
1. kernel assume it only cares about the present CPU. For non present CPU, it 
will simply stop going further and return, or trigger BUG(). When switch to 
acpi id, the acpi processor object may refer to a non present cpu, so the code 
need to be able to handle the non-present CPU situation.
2. native kernel use per_cpu data extensively, which is indexed by general cpu 
id. when switch to acpi id, these per_cpu data should be changed to the array 
indexed by acpi id.

Take the acpi processor core code (driver/acpi/ processor_core.c) as example, 
the condition check " BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0)); " need 
change. the per-cpu data processor_device_array, processors need change. And 
the cpu_sys_devices in get_cpu_sysdev need more thoughts before changing, since 
it is globally used by other component.

Another example is the cpufreq case. if we want to use acpi id in cpufreq case, 
we also need to resolve the above two conflicts. For example, in 
drivers/cpufreq/cpufreq.c, its core data struct " cpufreq_policy " is per-CPU, 
thus need many changes in every place it is used. and the condition checking, 
like " if (cpu >= nr_cpu_ids) goto err_out;" also need change. Compared with 
the change in the driver/acpi/ processor_core.c, the change in cpufreq is more 
intrusive. Since the acpi processor core code already has the Px info parsing 
functionality, it may be better not changing cpufreq.

Best Regards
Ke

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