|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [PATCH] increase maxmem before calling xc_domain_populate_physmap
On 12/02/14 07:26, Stefano Stabellini wrote: On Mon, 1 Dec 2014, Don Slutz wrote:On 12/01/14 10:37, Stefano Stabellini wrote:On Mon, 1 Dec 2014, Don Slutz wrote:On 11/27/14 05:48, Stefano Stabellini wrote:[...]Works fine in both claim modes and with PoD used (maxmem > memory). Do not know how to test with tmem. I do not see how it would be worse then current code that does not auto increase. I.E. even without a xen change, I think something like this could be done.OK, good to know. I am OK with increasing maxmem only if it is strictly necessary.My testing shows a free 32 pages that I am not sure where they come from. But the code about is passing my 8 nics of e1000.I think that raising maxmem a bit higher than necessary is not too bad. If we really care about it, we could lower the limit after QEMU's initialization is completed.Ok. I did find the 32 it is VGA_HOLE_SIZE. So here is what I have which includes a lot of extra printf.In QEMU I would prefer not to assume that libxl increased maxmem for the vga hole. I would rather call xc_domain_setmaxmem twice for the vga hole than tie QEMU to a particular maxmem allocation scheme in libxl.Ok. The area we are talking about is 0x000a0000 to 0x000c0000. It is in libxc (xc_hvm_build_x86), not libxl. I have no issue with a name change to some thing like QEMU_EXTRA_FREE_PAGES. Clearly I am not writing clear enough statements. xc_hvm_build_x86 is not allocating memory for it. libxl__build_pre() sets maxmem via xc_domain_setmaxmem(). Then xc_hvm_build_x86 allocates memory skipping the VGA hole 0xA0000-0xC0000. So difference betweenmaxmem (max_pages, xlinfo->max_memkb) and tot_pages (xlinfo->current_memkb) is videoram + LIBXL_MAXMEM_CONSTANT + 32 (I.E. what VGA_HOLE_SIZE is definded as). My testing has shows that some of these 32 pages are used outside of QEMU. I am seeing just 23 free pages using a standalone program to display the same info after a CentOS 6.3 guest is done booting.In libxl I would like to avoid increasing mamxem for anything QEMU will allocate later, that includes rom and vga vram. I am not sure how to make that work with older QEMU versions that don't call xc_domain_setmaxmem by themselves yet though. Maybe we could check the specific QEMU version in libxl and decide based on that. Or we could export a feature flag in QEMU.Yes, it would be nice to adjust libxl to not increase maxmem. However since videoram is included in memory (and maxmem), making the change related to vram is a bigger issue. the rom change is much simpler. Currently I do not know of a way to do different things based on the QEMU version and/or features (this includes getting the QEMU version in libxl). I have been going with: 1) change QEMU 1st. 2) Wait for an upstream version of QEMU with this. 3) change xen to optionally use a feature in the latest QEMU.Let's try to take this approach for the videoram too Ok.
Will switch.
If you do not use some slack (like 32 here), xen does report: (d5) [2014-11-29 17:07:21] Loaded SeaBIOS (d5) [2014-11-29 17:07:21] Creating MP tables ... (d5) [2014-11-29 17:07:21] Loading ACPI ...(XEN) [2014-11-29 17:07:21] page_alloc.c:1568:d5 Over-allocation for domain 5: 1057417 > 1057416 (XEN) [2014-11-29 17:07:21] memory.c:158:d5 Could not allocate order=0 extent: id=5 memflags=0 (0 of 1) (d5) [2014-11-29 17:07:21] vm86 TSS at 00098c00 (d5) [2014-11-29 17:07:21] BIOS map: However while QEMU startup ends with 32 "free" pages (maxmem - curmem)this quickly changes to 23. I.E. there are 7 more places that act like a call to xc_domain_populate_physmap_exact() but do not log errors if there is no free pages. And just to make sure I do not fully understand what is happening here, after the message above, the domain appears to work fine and ends up with 8 "free" pages (code I do not know about ends up releasing populated pages).So my current thinking is to have QEMU leave a few (9 to 32 (64?)) pages "free".
Will mark as for 2.3 -Don Slutz _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |