[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] pre-reservation of memory for domain creation



Jan, 

Removing this 1M pre-allocation of shadow memory may have difficulty.
If we want to ensure safety, we should balloon out enough memory before
any shadow operation. This needs to move the full balloon of memory in
the beginning place of _constructDomain(), and this needs the domain
vcpu number information. This change may have a flaw that we easily
ballon out so much memory at an early stage and guest maybe could
not correctly boot up (for example, error configuration).

Another problem is that, currently the operations of setting vcpu number
and alloc_vcpu() are done within one hypercall. Memory ballooning and
allocation should be called between them in order to allocate 128 pages
for each vcpu (Actually I think this "128" is also from experience).

Thanks!
Dongxiao



Jan Beulich wrote:
>>>> "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx> 22.01.10 05:28 >>>
>> Hi, Jan,
>>    This patch may not work because when allocating 128 pages for
>> each vcpu, tool side hasn't balloon so much memory for it. So the
>>    allocation may fail. What about this solution, we change the tool
>> side to balloon more memory for pre-reserve memory (For example
>> 8M),and pre-alloc 4M for domain creation (which works for 128 vcpus)?
> 
> Based on what information do you judge that 4M will work for 128
> vCPU-s?
> 
> And how did you conclude that ballooning 8M will be sufficient to be
> able to allocate 4M (before the patch in question 4M got ballooned in
> order to be able to allocate 1M)?
> 
>> Anyway like the comment in _constructDomain, it's still somewhat
>> hacky.
> 
> Indeed. Which is why I'm concerned about extending this hack.
> 
> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.