From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 4/7] libxl: vNUMA supporting interface Date: Wed, 27 Nov 2013 00:21:40 +0100 Message-ID: <1385508100.15201.40.camel@Solace> References: <1384806262-12532-1-git-send-email-ufimtseva@gmail.com> <1384806262-12532-5-git-send-email-ufimtseva@gmail.com> <1384886226.19880.182.camel@Abyss> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6018564506127184753==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Elena Ufimtseva Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , George Dunlap , Matt Wilson , Li Yechen , Ian Jackson , "xen-devel@lists.xen.org" , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============6018564506127184753== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-9UWSEFYSCjKavd1jube6" --=-9UWSEFYSCjKavd1jube6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mar, 2013-11-26 at 17:14 -0500, Elena Ufimtseva wrote: > On Thu, Nov 21, 2013 at 4:59 AM, Li Yechen wrote: > > Hi Elena and Dario, > >> + /* Determine the best nodes to fit vNUMA nodes */ > >> + /* TODO: change algorithm. The current just fits the nodes > >> + * Will be nice to have them also sorted by size > >> + * If no p-node found, will be set to NUMA_NO_NODE > >> + */ > >> + claim =3D calloc(info->nr_vnodes, sizeof(*claim)); > >> + if (claim =3D=3D NULL) > >> + return rc; > >> + > >> + libxl_for_each_set_bit(n, info->nodemap) > >> + { > >> + for (i =3D 0; i < info->nr_vnodes; i++) > >> + { > >> + if (((claim[n] + (mems[i] << 20)) <=3D ninfo[n].free) && > >> + /*vnode was not set yet */ > >> + (info->vnode_to_pnode[i] =3D=3D VNUMA_NO_NODE ) ) > >> + { > >> + info->vnode_to_pnode[i] =3D n; > >> + claim[n] +=3D (mems[i] << 20); > >> + } > >> + } > >> + } > >> + > > > > So in the initial part, each vnode is set to EXACTLY ONE pnode, right? >=20 > Hi Yechen >=20 > Yes, one node or VNUMA_NO_NODE (any node); >=20 Yes, but, at the same time, this particular chunk of code is most likely going to change, in order to better integrate with automatic NUMA placement. In fact, if I'm reading this right (as I said when reviewing this patch), this kind of try to compact more vnodes in the same pnode, if they fit. Although I see the reason why you ma want to do that, I'm still of the opinion that, if info->nodemap has some info coming from the placement algorithm, we should just honor them... That thing (the placement algorithm) is too complicated to just trow away the results! :-P I'm sorry I haven't got to write some code about this, I hope to find some time to do that soon enough. Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-9UWSEFYSCjKavd1jube6 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.15 (GNU/Linux) iEYEABECAAYFAlKVLQQACgkQk4XaBE3IOsQqgACeO2CMciGTculBnby7xV+kknRn +SQAn3WwFvnrrcsUgX4htB63a92cRdK2 =waLC -----END PGP SIGNATURE----- --=-9UWSEFYSCjKavd1jube6-- --===============6018564506127184753== 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 --===============6018564506127184753==--