From: "James (song wei)" <jsong@novell.com>
To: xen-devel@lists.xensource.com
Subject: Re: [Patch] adjust the cpu-affinity to more than 64 cpus
Date: Wed, 17 Mar 2010 19:26:08 -0700 (PDT) [thread overview]
Message-ID: <27941020.post@talk.nabble.com> (raw)
In-Reply-To: <4BA0AE00020000780003576C@vpn.id2.novell.com>
Jan Beulich wrote:
>
>>>> "James (song wei)" <jsong@novell.com> 17.03.10 09:56 >>>
>>--- a/tools/python/xen/lowlevel/xc/xc.c Mon Mar 15 17:08:29 2010 +0000
>>+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Mar 17 16:51:07 2010 +0800
>>@@ -215,35 +215,54 @@
>> {
>> uint32_t dom;
>> int vcpu = 0, i;
>>- uint64_t cpumap = ~0ULL;
>>+ uint64_t *cpumap;
>> PyObject *cpulist = NULL;
>>+ int nr_cpus, size;
>>+ xc_physinfo_t info;
>>+ xc_cpu_to_node_t map[1];
>>+ uint64_t cpumap_size = sizeof(cpumap);
>
> Perhaps sizeof(*cpumap)?
>
> -- Yeah,you are right.
>
>>...
>>+ *(cpumap + cpu / (cpumap_size * 8)) |= (uint64_t)1 << (cpu %
> (cpumap_size * 8));
>
> Using [] here and in similar places further down would likely make these
> constructs a little bit more legible.
> --yes.
>
>>@@ -362,7 +381,11 @@
>> uint32_t dom, vcpu = 0;
>> xc_vcpuinfo_t info;
>> int rc, i;
>>- uint64_t cpumap;
>>+ uint64_t *cpumap;
>>+ int nr_cpus, size;
>>+ xc_physinfo_t pinfo = { 0 };
>>+ xc_cpu_to_node_t map[1];
>>+ uint64_t cpumap_size = sizeof(cpumap);
>
> Same as above.
>
>>@@ -385,17 +421,18 @@
>> "cpu", info.cpu);
>>
>> cpulist = PyList_New(0);
>>- for ( i = 0; cpumap != 0; i++ )
>>+ for ( i = 0; i < size * cpumap_size * 8; i++ )
>
> Why not simply use nr_cpus here?
> --Yes, copy amount of nr_cpus bitsare enough here.
>
> Jan, thank you very much! I'll post the new patch here soon.
>
> -Jame (Song Wei)
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
--
View this message in context: http://old.nabble.com/-Patch--adjust-the-cpu-affinity-to-more-than-64-cpus-tp27928229p27941020.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
next prev parent reply other threads:[~2010-03-18 2:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 8:56 [Patch] adjust the cpu-affinity to more than 64 cpus James (song wei)
2010-03-17 9:25 ` Jan Beulich
2010-03-18 2:26 ` James (song wei) [this message]
2010-03-18 3:41 ` James (song wei)
2010-03-19 3:14 ` Masaki Kanno
2010-03-19 9:09 ` James Song
2010-03-19 9:39 ` issue with c/s 21046 (was Re: [Patch] adjust the cpu-affinity to more than 64 cpus) Jan Beulich
2010-03-19 10:28 ` [Patch] adjust the cpu-affinity to more than64 cpus Masaki Kanno
2010-03-19 10:47 ` issue with c/s 21046 (was Re: [Patch] adjust the cpu-affinity to more than 64 cpus) James Song
2010-03-19 11:10 ` Jan Beulich
2010-03-30 18:23 ` [Patch] adjust the cpu-affinity to more than 64 cpus Liu, Jinsong
2010-03-31 2:12 ` James Song
2010-03-31 6:29 ` Masaki Kanno
2010-03-31 8:26 ` Liu, Jinsong
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=27941020.post@talk.nabble.com \
--to=jsong@novell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).