[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4 of 4] xenpaging: initial libxl support
On Tue, Nov 22, Stefano Stabellini wrote: > On Mon, 21 Nov 2011, Olaf Hering wrote: > > On Mon, Nov 21, Stefano Stabellini wrote: > > > > > what if tot_memkb is bigger than target_memkb? Or even bigger than > > > max_memkb? > > > > tot_memkb is unrelated to target_memkb, also somewhat unrelated to > > max_memkb. > > At build time ballooning is not active yet and target_memkb represents > the amount of memory available to the VM plus the videoram (see > libxl__build_hvm). > As a consequence I think that tot_memkb cannot be higher than > target_memkb - videoram_memkb (that is build_start in the diagram). It can because with xenpaging the target_memkb turns from real memory into virtual memory, and tot_memkb is the new amount of real memory. The actual checking wether the tot_memkb/target_memkb/max_memkb are sane can be either done when they are changed with xl mem-XY like its done now. Or we add new code to do such checking already during config parsing. > So, what is going to happen if tot_memkb is higher than target_memkb - > videoram_memkb? Nothing happens, since xenpaging is the only consumer of that variable (via xenstore). See below. > Also, what is going to happen if it is lower? If its lower, xenpaging will page-out some pages, adds them back if the guest happens to access them and page-out some other pages. The guest still has access to all memory it thinks it has (target_memkb). > > xenpaging will look at tot_memkb value (at "memory/target-tot_pages" to > > be precise) and try to reach that number of domain->tot_pages. If the > > tot_memkb number is larger than max_memkb nothing will happen. > > How is it going to reach the tot_pages target? Where is it going to take > the memory from? Is it going to automatically page out memory from other > VMs? xenpaging does not add new memory. If it has no pages to page-in and tot_pages is still higher, it will do nothing. > > Right now there is not much checking anyway, memory=1024 maxmem=1 in the > > config is accepted in my testing. > > That is a correct configuration: it means that the domain has 1024MB of > RAM but it cannot allocate any more (maximum allocation limit being 1MB). > maxmem doesn't influence the current memory of the VM, only future > allocations. It causes stall in the host, perhaps due to an interger overflow (I have not analyzed it yet). Olaf _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |