|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Add CPU topology info (thread/core/socket) in xe
To: |
"Yu, Ke" <ke.yu@xxxxxxxxx> |
Subject: |
Re: [Xen-devel] [PATCH] Add CPU topology info (thread/core/socket) in xenpm |
From: |
Akio Takebe <takebe_akio@xxxxxxxxxxxxxx> |
Date: |
Fri, 13 Mar 2009 19:46:19 +0900 |
Cc: |
"Liu, Jinsong" <jinsong.liu@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx> |
Delivery-date: |
Fri, 13 Mar 2009 03:46:49 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<49BA2B72.6090600@xxxxxxxxxxxxxx> |
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: |
<4D05DB80B95B23498C72C700BD6C2E0B085EA034@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <49BA2B72.6090600@xxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
Hi,
Akio Takebe wrote:
> Hi, Yu
>
> Good patch! We wanted this feature.
>
>> Add CPU topology info (thread/core/socket) in xenpm
> Can this patch show thread?
>
>> +#define MAX_NR_CPU 512
>> +
>> +void cpu_topology_func(int argc, char *argv[])
>> +{
>> + uint32_t cpu_to_core[MAX_NR_CPU];
>> + uint32_t cpu_to_socket[MAX_NR_CPU];
>> + struct xc_get_cputopo info;
>> + int i, ret;
>> +
>> + info.cpu_to_core = cpu_to_core;
>> + info.cpu_to_socket = cpu_to_socket;
>> + info.max_cpus = MAX_NR_CPU;
>> + ret = xc_get_cputopo(xc_fd, &info);
>> + if (!ret)
>> + {
>> + printf("CPU\tcore\tsocket\n");
>> + for (i=0; i<info.nr_cpus; i++)
>> + {
>> + if ( info.cpu_to_core[i] != INVALID_TOPOLOGY_ID &&
>> + info.cpu_to_socket[i] != INVALID_TOPOLOGY_ID )
>> + {
>> + printf("CPU%d\t %d\t %d\n", i, info.cpu_to_core[i],
>> + info.cpu_to_socket[i]);
>> + }
>> + }
>> + }
>> + else
>> + {
>> + printf("Can not get Xen CPU topology!\n");
>> + }
>> +
>> + return ;
>> +}
> The function looks like only show core/socket.
>
Is the CPU%d means thread?
Best Regards,
Akio Takebe
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|