xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Shuoling Deng <mr.dengshuoling@gmail.com>
Cc: Jan Beulich <JBeulich@suse.com>, xen-devel@lists.xen.org
Subject: Re: NUMA Node distance on Xen
Date: Thu, 13 Jun 2013 02:16:00 +0200	[thread overview]
Message-ID: <1371082560.3298.31.camel@Abyss> (raw)
In-Reply-To: <CAFcyk=RFd5kDtp09fq7rTa1iFdyAR3hG9BYttNr9yDfcrf0o-Q@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3556 bytes --]

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)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2013-06-13  0:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 10:48 NUMA Node distance on Xen Shuoling Deng
2013-06-12 13:00 ` Jan Beulich
2013-06-12 14:14   ` Shuoling Deng
2013-06-13  0:16     ` Dario Faggioli [this message]
2013-06-12 23:47 ` Dario Faggioli

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=1371082560.3298.31.camel@Abyss \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=mr.dengshuoling@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /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).