From: Akio Takebe <takebe_akio@jp.fujitsu.com>
To: "Yu, Ke" <ke.yu@intel.com>
Cc: "Liu, Jinsong" <jinsong.liu@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Keir Fraser <keir.fraser@eu.citrix.com>,
"Wei, Gang" <gang.wei@intel.com>
Subject: Re: [PATCH] Add CPU topology info (thread/core/socket) in xenpm
Date: Fri, 13 Mar 2009 19:46:19 +0900 [thread overview]
Message-ID: <49BA397B.80305@jp.fujitsu.com> (raw)
In-Reply-To: <49BA2B72.6090600@jp.fujitsu.com>
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
next prev parent reply other threads:[~2009-03-13 10:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 9:00 [PATCH] Add CPU topology info (thread/core/socket) in xenpm Yu, Ke
2009-03-13 9:46 ` Akio Takebe
2009-03-13 10:46 ` Akio Takebe [this message]
2009-03-13 12:45 ` Yu Ke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49BA397B.80305@jp.fujitsu.com \
--to=takebe_akio@jp.fujitsu.com \
--cc=gang.wei@intel.com \
--cc=jinsong.liu@intel.com \
--cc=ke.yu@intel.com \
--cc=keir.fraser@eu.citrix.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.