[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.7] libxl: keep PoD target adjustment by memory fudge after reload_domain_config()
On Tue, May 31, 2016 at 6:42 PM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote: > From: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> > > Commit 56fb5fd623 ("libxl: adjust PoD target by memory fudge, too") > introduced target_memkb adjustment for HVM PoD domains on create. The > adjustment is however being reset on reload_domain_config() (e.g. when > we reboot the guest). It was determined that all of the following... > For example: > > I'm trying to create HVM PoD domain with the following settings: > memory=1024 > maxmem=4096 > When the domain boots for the first time I see the following in Xen: > > (XEN) nr_pages=262145 ... max_pages=262400 (looks good) > > When I reboot the domain I see the following: > (XEN) nr_pages=261889 ... max_pages=262144 (oops) > > After second reboot: > (XEN) nr_pages=261633 ... max_pages=261888 (even less) > > And eventually the domain crashes with "p2m_pod_demand_populate: Dom4 out of > PoD memory! (tot=261377 ents=787200 dom4)". has actually nothing to do with this patch; and that actually, contrary to the description above, the problem is that the adjustment is *not* being reset. A better description would be something like this: --- Commit 56fb5fd623 ("libxl: adjust PoD target by memory fudge, too") introduced target_memkb adjustment for HVM PoD domains on create, wherein the value it wrote to target is always 1MiB lower than the actual target_memkb. Unfortunately, on reboot, it is this value which is read *unmodified* to feed into the next domain creation; from which 1MiB is subtracted *again*. This means that any guest which reboots with memory < maxmem will have its memory target decreased by 1MiB on every boot. This patch makes it so that when reading target on reboot, we adjust the value we read *up* by 1MiB, so that the domain will be build with the appropriate amount of memory and the target will remain the same after reboot. This is still not quite a complete fix, as the 1MiB offset is only subtracted when creating or rebooting; it is not subtracted when 'xl set-memory' is called. But it will prevent any situations where memory is continually increased or decreased. A better fix will have to wait until after the release. --- -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |