From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 3/6] ts-xen-install: Add dom0_mem runvar to control dom0 memory Date: Tue, 8 Sep 2015 13:52:22 +0100 Message-ID: <1441716742.24450.79.camel@citrix.com> References: <1438880611-13244-1-git-send-email-anthony.perard@citrix.com> <1438880611-13244-4-git-send-email-anthony.perard@citrix.com> <1441712924.24450.75.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1441712924.24450.75.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: Anthony PERARD , xen-devel@lists.xen.org Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org On Tue, 2015-09-08 at 12:48 +0100, Ian Campbell wrote: > On Thu, 2015-08-06 at 18:03 +0100, Anthony PERARD wrote: > > Signed-off-by: Anthony PERARD > > --- > > ts-xen-install | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/ts-xen-install b/ts-xen-install > > index 0f53382..17edfb7 100755 > > --- a/ts-xen-install > > +++ b/ts-xen-install > > @@ -153,7 +153,8 @@ sub setupboot () { > > logm("No Xen console device defined for host"); > > } > > if (toolstack($ho)->{Dom0MemFixed}) { > > - $xenhopt .= " dom0_mem=512M,max:512M"; > > + my $mem = $r{'dom0_mem'} // 512; > > I think the highest preference should be for $r{"$ho->{Ident}_dom0_mem"} > (which makes it host specific in multi host jobs). I think it is probably > still worth having a global dom0_mem runvar you have here too. So: > > my $mem = $r{"$ho->{Ident}_dom0_mem"} // $r{'dom0_mem'} // 512; > > (maybe needs wrapping) That said, your code is clearly correct so maybe this can be left to the person who needs per-host control of this. So if Ian agrees: Acked-by: Ian Campbell Eventually I suppose we might want a host_runvar helper taking $ho, the suffix ("dom0_mem") and a fallback default. > > > + $xenhopt .= " dom0_mem=${mem}M,max:${mem}M"; > > } > > > > # If /boot/microcode.cpio is present then ts-host-install has > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel