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

Re: [Xen-ia64-devel] [PATCH] fixes DOM0_PHYSINFO hypercall



Hi Kevin,

Thanks for your advice and information.

I understood the meaning of log_overview.num_log.
I will correct and test this patch, and post again. 

Best Regards,
 Kan

Tian, Kevin wrote:
>
>>From: Masaki Kanno
>>Sent: 2005定12埖12晩 18:52
>>Hi,
>>
>>This patch fixes DOM0_PHYSINFO hypercall.
>>
>>However, I found a problem in 'smp_num_siblings'.
>>I changed the setting of BIOS to disabled the hyperthread, so I expected
>>'smp_num_siblings' to 1.
>>But, its value is 2, because the value of log_overview.tpc
>>(PAL_LOGICAL_TO_PHYSICAL) is 2.
>>Is there any way to know the current setting of the hyperthread?
>
>Hi, Kanno
>
>       That depends on what you wanna that field to be. Current code from 
> Linux just uses smp_num_siblings and 
smp_num_cpu_cores to record physical die information, which is retrieved from 
PAL_LOGICAL_TO_PHYSICAL in boot time. So 
they're exactly same meaning to threads_per_core and cores_per_socket here, 
which stands for static physical capability. 
That will not be affected by your BIOS setting.
>
>       If you want to add a field to indicate active siblings of current 
> logical processor (no such field in current 
phys_info), you should either go to cpuinfo_ia64 structure for field num_log 
which indicating online physical threads 
within this die. More specifically, you can even walk cpu_core_map(index) and 
cpu_sibling_map(index) for more detail 
online information. But it seems num_log should be enough.
>
>       Hope helps.
>
>Thanks,
>Kevin
>>
>>Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
>>
>>Best Regards,
>> Kan
>>
>>
>>diff -r 0255f48b757f xen/arch/ia64/xen/dom0_ops.c
>>--- a/xen/arch/ia64/xen/dom0_ops.c      Sun Dec  4 19:12:00 2005
>>+++ b/xen/arch/ia64/xen/dom0_ops.c      Fri Dec  9 23:49:11 2005
>>@@ -200,13 +200,13 @@
>>         dom0_physinfo_t *pi = &op->u.physinfo;
>>
>>         pi->threads_per_core = smp_num_siblings;
>>-        pi->cores_per_socket = 1; // FIXME
>>+        pi->cores_per_socket = smp_num_cpucores;
>>         pi->sockets_per_node =
>>             num_online_cpus() / (pi->threads_per_core * 
>> pi->cores_per_socket);
>>         pi->nr_nodes         = 1;
>>         pi->total_pages      = 99;  // FIXME
>>         pi->free_pages       = avail_domheap_pages();
>>-        pi->cpu_khz          = 100;  // FIXME cpu_khz;
>>+        pi->cpu_khz          = local_cpu_data->proc_freq / 1000;
>>         memset(pi->hw_cap, 0, sizeof(pi->hw_cap));
>>         //memcpy(pi->hw_cap, boot_cpu_data.x86_capability, NCAPINTS*4);
>>         ret = 0;
>>diff -r 0255f48b757f xen/include/asm-ia64/config.h
>>--- a/xen/include/asm-ia64/config.h     Sun Dec  4 19:12:00 2005
>>+++ b/xen/include/asm-ia64/config.h     Wed Dec  7 19:48:44 2005
>>@@ -129,8 +129,10 @@
>> // needed for common/dom0_ops.c until hyperthreading is supported
>> #ifdef CONFIG_SMP
>> extern int smp_num_siblings;
>>+extern int smp_num_cpucores;
>> #else
>> #define smp_num_siblings 1
>>+#define smp_num_cpucores 1
>> #endif
>>
>> // from linux/include/linux/mm.h
>>
>>
>>
>>_______________________________________________
>>Xen-ia64-devel mailing list
>>Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>>http://lists.xensource.com/xen-ia64-devel

----
菅野 大樹/Masaki Kanno,TEL 055-924-7349(7551-5364),富士通(株)沼津工場B6F
基盤ソ事 第1開発部 VM開発prj & オープンVMprj kanno.masaki@xxxxxxxxxxxxxx


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


 


Rackspace

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