From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 1/7] xen: vNUMA support for PV guests Date: Wed, 27 Nov 2013 02:23:09 +0100 Message-ID: <1385515389.15201.90.camel@Solace> References: <1384806262-12532-1-git-send-email-ufimtseva@gmail.com> <1384806262-12532-2-git-send-email-ufimtseva@gmail.com> <528B7D350200007800104840@nat28.tlf.novell.com> <1384871712.19880.90.camel@Abyss> <528B885702000078001048CF@nat28.tlf.novell.com> <1384875772.15360.6.camel@Solace> <528B97C502000078001049AE@nat28.tlf.novell.com> <1384878960.15360.27.camel@Solace> <528BA34E0200007800104A88@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6837713201903001844==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VlTqW-0007YG-Jt for xen-devel@lists.xenproject.org; Wed, 27 Nov 2013 01:23:16 +0000 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 , Li Yechen , George Dunlap , Matt Wilson , Stefano Stabellini , Ian Jackson , Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org --===============6837713201903001844== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-2jYS+hYN8TY55QpgsK/V" --=-2jYS+hYN8TY55QpgsK/V Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mar, 2013-11-26 at 16:59 -0500, Elena Ufimtseva wrote: > Hello Jan and Dario. >=20 Hi, > I have looked at what Jan asked and wanted to see if that can be resolved= . >=20 > Jan is right, if the guest is running with Linux configured with > maxcpus less than vcpus in VM config, > there is a problem. >=20 Yep, there is indeed. > On this boot stage where xen_numa_init is called xen_smp_prepare_cpus > equals to vcpus in config; > It only will be reduced to maxcpus (from kernel boot args) after > xen_numa_init during xen_smp_prepare. >=20 > In xen_numa_init I have all values I need to make a decision in > regards to initialize vnuma or not, or modify. >=20 > These are the numbers I have in xen_numa_init: > num_possible_cpus() =3D hypervisor provided guest vcpus; > setup_max_cpus =3D boot kernel param maxcpus; >=20 > When setup_max_cpus > num_possible_cpus, num_possible_cpus will be brough= t up; >=20 Wait. I think I see what you mean, but that's probably a different issue from what (at least as far as I understood it) Jan is reporting. So, in Linux you can specify NR_CPUS at compile time, right? Imagine doing that and setting it to 1. Then, you use the resulting kernel for a VM, and in the VM's config file you specify 4 vcpus and 2 vnodes. Now, apart from what you say above, i.e., only num_possible_cpus()=3D1 will be brought up, that would also mean that, in xen_numa_init(), you allocate an array only 1 element big for hosting vnuma data and pass it to Xen, which will overflow it when trying to put info for 2 vnodes there! That's the thing we want to avoid... > I can detect that setup_max_cpus < num_possible_cpus and do not init > vnuma at all, and just do a fake node. > I can also make sure that hypervisor is aware of it (by calling same > subop with NULL, lets suppose). >=20 Right, but I'm not sure I'm getting how detecting that would relevant to the issue above... What we'd need is something like nr_vnodesnum_possible_cpus() and, if yes, have xen_numa_init() take some error path, but that is a different thing. Does this make sense? Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-2jYS+hYN8TY55QpgsK/V 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) iEYEABECAAYFAlKVSX0ACgkQk4XaBE3IOsR/DQCffEXr3Qy/J4xpDI2WwBn8DE89 uOAAni78y83jjdukyaKMKOggP4pjs6Dn =YPiJ -----END PGP SIGNATURE----- --=-2jYS+hYN8TY55QpgsK/V-- --===============6837713201903001844== 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 --===============6837713201903001844==--