On mer, 2013-06-12 at 22:14 +0800, Shuoling Deng wrote:> Umm, I used to execute "xm info -n", but it doesn''t
display the numa -
> distance on my 3.0.13-0.27-xen.
>
Wow! I never had the chance to see what `xm info -n'' does, while I know
that very well for `xl info -n''. Of course, you can use the latter if
you settle on a version of Xen that includes xl and libxl, which is
highly recommended! :-P
No, seriously, is there any particular reason why you want to use
3.0.13 ? Doing any work (i.e., modifying the sources) on that version is
going to be quite pointless --at least for us here in this ML-- and you
wiill hardly receive any support and advice, since development
concentrates on the current status of the code, not on how it looked
like _years_ ago...
> But in the source code 4.2, i could see the
"node_to_node_distance",
> so i am doubt that my version is too low.
>
Yes, it is, indeed, too old. If you''re interested in doing development,
you really should consider moving on to dealing with the code hosted in
our source code repositories
http://wiki.xen.org/wiki/Xen_Repositories
If it''s an "user thing", or you just want to try with
something that
does not include cloning a git repo, I''d still recommending the newest
version of Xen that you can get, so either 4.2, or even one of the
4.3-rc-s.
> Anyway, i will try to upgrade my version and try to find out the
> answer.
>
Please. :-)
> by the way, is there some way to find the source-code of my 3.0.13
> version of Xen?
> I think i could grep the "node_to_node_distance" to find more
details
> in my 3.0.13.
>
I bet they are somewhere, but I''ve no idea where to point you to. As I
already said, if that is possible for you, I''d really like to point you
to the sources of something much more current! :-)
http://xenproject.org/developers/teams/hypervisor.html
http://www.xenproject.org/downloads/xen-archives.html
> i am very sorry as a freshman for issue this question.
>
Yeah, well, no big deal, although you may want to have a look at this
page, explaining how to ask questions in a way better suited for this
forum: http://wiki.xen.org/wiki/Asking_Xen_Devel_Questions
Regarding the root of your question, here''s something:
http://xenbits.xen.org/gitweb/?p=xen.git&a=search&h=refs%2Fheads%2Fstaging&st=grep&s=node_distance
This, for instance, tells you that there is a function, called
__node_distance(), that you can use, provided you include asm-x86/numa.h
(not directly, though... Probably via just including numa.h, IIRC).
That very function is defined in the file xen/arch/x86/srat.c, line 465,
so go there to see how it is implemented. For now, the only place where
that function is actually used in Xen seems to be xen/common/sysctl.c,
line 304, for the purpose of reporting NUMA distances information up to
the various toolstack layers, but it should be pretty easy to call and
use it elsewhere, if you need it.
Hope this helps.
Oh, this all above, of course, holds true for the very latest version of
the Xen source code (the one in the git repo). If you can''t get to use
this version, then you''ll have to crawl in the sources of whichever
version you want to use without much help from us/me. :-*
Best Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel