Description of problem: I'm following the test case here: https://fedoraproject.org/wiki/QA:Testcase_Virtualization_XenDomU_Cmdline_params. My F-11 Xen domU is configured to start with 2047MB of memory. However, while booting, I specified mem=1G on the kernel command-line, and the guest properly booted with only 1G of memory. However, it does *not* give the spare memory back to the hypervisor. That is, since we've set mem=, we can never balloon above that, so we should give that memory back to the HV so it can use it for other domains. This works as expected in the RHEL-5 domU kernel, and in upstream linux-2.6.18-xen.hg.
Miroslav, This one is much less important. It would be nice to get it to work, but it's not critical. Chris Lalancette
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Created attachment 358049 [details] Patch for 2.6.29 kernel Problem is caused by missing code for returning memory to HV. Patch adding this code to 2.6.29 kernel sent to Jeremy Fitzhardinge with CC na LKML and Xen-devel.
Thread is here: http://lists.xensource.com/archives/html/xen-devel/2009-08/threads.html#00573 Sounds like Jeremy wants to use the e820 map to find unused memory rather than just max_pfn
Yes, exactly. Miroslav, would you mind reworking your patch along those lines?
Created attachment 361207 [details] Returning memory not contained in e820 map General solution - returns all not mapped memory.
Grabbing this one to get the patch tested and into Fedora.
There should be optimized version of patch in Jeremy's repo. However, this version has wrong location of return_unused_memory - it is in xen_memory_setup not in xen_post_allocator_init. branch rebase/core-freemem branch at git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
Indeed, the version of the patch in jeremy's repo does not actually seem to return the unused memory.
No, there's a problem with it. Aside from releasing a bit too early, the test to make sure the page being released actually belongs to the domain seems to always return false, so it never wants to release anything. I'm not sure why; it looks OK to me, but I haven't investigated it in detail yet.
Created attachment 395766 [details] patch as committed to jeremy's repo Attaching patch from Jeremy's repo for posterity.
I just had another look at this and noticed a rather obvious bug in the patch: "mfn = pfn_to_mfn(mfn);" rather than "mfn = pfn_to_mfn(*p*fn);". Fixing this makes it free memory properly as expected.
This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.