From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: NUMA-aware VM placement in Xen Date: Fri, 24 Feb 2012 11:12:03 +0100 Message-ID: <1330078323.5034.73.camel@Abyss> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8092110940503748202==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: George Dunlap , "Ian.Campbell" , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org --===============8092110940503748202== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-xhm0RlRfe6wv4g887RBW" --=-xhm0RlRfe6wv4g887RBW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi guys, As some of you know I'm working on putting some kind of NUMA-aware placement of the various VMs within Xen. This means I'm investigating deeply how memory allocation works, which isn't an easy task for me (I started completely from scratch), so forgive me if I say something wrong! :-P The status is I'm dealing for a while with a "design issue" I'd be very glad to discuss with someone, as I'm not sure which path to go for... To keep it short, what I need is a place --ideally during VM creation-- where I can check how much memory a VM wants against how much memory is available in the various NUMA-nodes, and use this as the basis of my decision. The question is, where is this place? I traced memory related calls (e.g., for HVMs) from libxl__build_hvm to xc_hvm_build_target_mem to setup_guest to xc_domain_populate_physmap and alloc_domheap_pages. The last twos have been my target for a while, but I'm not so sure they would be the right choice, mainly because both of them are called for allocating _only_part_ of the VM's memory, i.e., some extents of it at each call (am I right?). Basically, given alloc_domheap_pages uses d->node_affinity for deciding from which node(s) to actually take memory from, I was planning to either use the same mask or build a new one with similar purposes, the problem being _where_ to populate it with the proper nodes. I'm now looking at xc_domain_setmaxmem-->do_domctl(XEN_DOMCTL_max_mem), although I think it's too early, and I'd end up guessing wrt a lot of aspects... But considering xm/xend was doing the same even earlier (at least I think)... Sorry fro writing so much... Any help/ideas you feel comfortable with sharing would be very appreciated! :-) Thanks a lot and regards, Dario --=20 <> (Raistlin Majere) ------------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-xhm0RlRfe6wv4g887RBW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAk9HYnMACgkQk4XaBE3IOsTYjQCeO9xkoyIuKP5nvrcIFs3ivUqh RL4AoKSl4JqhEAsQXM/cHp9C0DEbHEvH =sQGs -----END PGP SIGNATURE----- --=-xhm0RlRfe6wv4g887RBW-- --===============8092110940503748202== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============8092110940503748202==--