From: Wei Liu Subject: Re: [PATCH v4 21/21] xl: vNUMA support Date: Wed, 28 Jan 2015 22:52:02 +0000 Message-ID: <20150128225202.GG14935@zion.uk.xensource.com> References: <1422011632-22018-1-git-send-email-wei.liu2@citrix.com> <1422011632-22018-22-git-send-email-wei.liu2@citrix.com> <1422463565.5187.68.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1422463565.5187.68.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Wei Liu , JBeulich@suse.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, ufimtseva@gmail.com List-Id: xen-devel@lists.xenproject.org On Wed, Jan 28, 2015 at 04:46:05PM +0000, Ian Campbell wrote: > On Fri, 2015-01-23 at 11:13 +0000, Wei Liu wrote: > > This patch includes configuration options parser and documentation. > > > > Please find the hunk to xl.cfg.pod.5 for more information. > > > > Signed-off-by: Wei Liu > > Cc: Ian Campbell > > Cc: Ian Jackson > > Cc: Dario Faggioli > > Cc: Elena Ufimtseva > > --- > > Changes in v2: > > 1. Make vnuma_vdistances mandatory. > > 2. Use nested list to specify vdistances. > > 3. Update documentation. > > --- > > docs/man/xl.cfg.pod.5 | 39 ++++++++++++ > > tools/libxl/xl_cmdimpl.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 186 insertions(+) > > > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > > index e2f91fc..b23bd6f 100644 > > --- a/docs/man/xl.cfg.pod.5 > > +++ b/docs/man/xl.cfg.pod.5 > > @@ -266,6 +266,45 @@ it will crash. > > > > =back > > > > +=head3 Virtual NUMA Memory Allocation > > + > > +=over 4 > > + > > +=item B > > + > > +Specify the size of memory covered by each virtual NUMA node. The number of > > +elements in the list also implicitly defines the number of virtual NUMA nodes. > > + > > +The sum of all elements in this list should be equal to memory size specified > > +by B in guest configuration file, or B if B is not > > +specified. > > Could we make it permissible to omit memory= and have the toolstack do > the maths for us? > This is OK. > I suppose == maxmem is due to no vnuma vs. PoD? What about for PV Yes. > guests, is preballooning allowed there too? I need to check PV boot sequence to have a definite answer. Currently memory allocation in libxc only deals with a chunk of contiguous memory. Not sure if I change that will break some assumptions that guest kernel makes. > > > + > > +=item B > > + > > +Specifiy which virutal NUMA node a specific vcpu belongs to. The number of > > "Specify" and "virtual". > > > +elements in this list should be equal to B in guest configuration > > +file, or B if B is not specified. > > Again, can we relieve the user of these tedious sums? This point becomes moot if we use other syntax to specify vcpu list. > > +=item B > > + > > +Specifiy which physical NUMA node a specific virtual NUMA node maps to. The > > "Specify" again. > > > +number of elements in this list should be equal to the number of virtual > > +NUMA nodes defined in B. > > Would it make sense to instead have a single array or e.g. "NODE:SIZE" > or something? > Or "PNODE:SIZE:VCPUS"? > > + > > +=item B > > + > > +Two dimensional list to specify distances among nodes. > > + > > +The number of elements in the first dimension list equals the number of virtual > > +nodes. Each element in position B is a list that specifies the distances > > +from node B to other nodes. > > + > > +For example, for a guest with 2 virtual nodes, user can specify: > > + > > + vnuma_vdistance = [ [10, 20], [20, 10] ] > > Any guidance on how a user should choose these numbers? > I think using the number from numactl is good enough. > Do we support a mode where something figures this out based on the > underlying distances between the pnode to which a vnode is assigned? > Dario is working on that. > Would a user ever want/need to override such a mapping? > Probably not. But we need to provide a way to override should user want to do so. Wei. > Ian.