|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] ts-debian-hvm-install: fix guest memory size
Wei Liu writes ("Re: [PATCH 2/2] ts-debian-hvm-install: fix guest memory size"):
> That's because there's a "slack" required when building a domain.
> Hmm...
>
> I can check for 5010 then set guest memory to 5000. What do you think?
Yes. Perhaps the slop you allow ought to be a bit bigger.
> > Also I don't like the separation of the two values for $ram_mb. The
> > manifest constant at the top of the script is misleading given that
> > the code might override it. I think you probably want to bury the
> > magic constant(s) in with the setting code.
>
> Do you mean
> if ($host_freemem_mb > 5000){
> $ram_mb = 5000;
> } else {
> $ram_mb = 768;
> }
Yes, something like that. Perhaps:
my $ram_minslop = 100;
my $ram_lots = 5000;
if ($host_freemem_mb > $ram_lots + $ram_minslop) {
$ram_mb = $ram_lots;
} else {
$ram_mb = 768;
}
because it avoids writing 5000 twice.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |