From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: Linux mainstream balloon driver fails to grow memory= -> maxmem= Date: Mon, 23 Aug 2010 17:50:49 -0700 Message-ID: <4C731769.1050002@goop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: xen-devel@lists.xensource.com, Daniel Kiper , Vasiliy G Tolstov List-Id: xen-devel@lists.xenproject.org On 08/23/2010 04:49 PM, Dan Magenheimer wrote: > Hi Jeremy -- > > Vasiliy discovered (and I confirmed) that the mainstream > Linux balloon driver won't balloon above the initial > memory with which the Linux guest was launched. E.g. > a 2.6.34 guest launched with these in vm.cfg: > > memory=1024 > maxmem=1536 > > displays properly in xentop, but changing target_kb > in /sys/devices/system/xen_memory/xen_memory0 > doesn't "take" for any value greater than 1024*1024. > > We tested with 2.6.34 but it even fails in RHEL6 Beta2. > > Is this a known problem/bug (or maybe a feature)? Known bug. There's no machinery in there to allocate enough struct pages for maxmem, only for "memory". The immediately workaround is to start the domain with fully populated "memory" and then have it balloon out the unwanted stuff asap, but it does mean you need to have enough memory to start with. There's a couple of experiments floating around in the tree to try to honour maxmem, but they're somewhat rotted. Its probably worth trying to resurrect them though. And of course there's Daniel's work which is a more flexible andcomprehensive approach, but it does rely on hotplug memory (which has its own overheads). J