From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAm16-0005tZ-R8 for qemu-devel@nongnu.org; Fri, 15 Apr 2011 12:37:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAm15-0001Cn-MN for qemu-devel@nongnu.org; Fri, 15 Apr 2011 12:37:08 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:44304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAm15-0001Cg-Io for qemu-devel@nongnu.org; Fri, 15 Apr 2011 12:37:07 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p3FGG02a021264 for ; Fri, 15 Apr 2011 12:16:00 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p3FGb2OU2347190 for ; Fri, 15 Apr 2011 12:37:02 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p3FGb2Wt013142 for ; Fri, 15 Apr 2011 12:37:02 -0400 From: Dave Hansen In-Reply-To: <4DA87093.7050008@us.ibm.com> References: <1302878695-10256-1-git-send-email-dave@linux.vnet.ibm.com> <4DA87093.7050008@us.ibm.com> Content-Type: text/plain; charset="ISO-8859-1" Date: Fri, 15 Apr 2011 09:36:55 -0700 Message-ID: <1302885415.16562.3358.camel@nimitz> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] set VIRTIO_BALLOON_F_MUST_TELL_HOST unconditionally List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Amit Shah , Anthony Liguori , qemu-devel@nongnu.org On Fri, 2011-04-15 at 11:21 -0500, Anthony Liguori wrote: > > This patch makes the "tell host first" logic the only case. This > > should make everybody happy, and reduce the amount of untested or > > untestable code in the kernel. > > It doesn't make me happy. Darn. > Why would we do this in QEMU? This prevents the guest from doing > ballooning reclaim during OOM. What the heck is "ballooning reclaim"? Could you elaborate a bit on how this happens? I think I'm missing some subtlety here. I think 'tell host first' is the only sane way to do it. Look at the 'tell host second code': release_pages_by_pfn(); // let other kernel users at the pages tell_host(); // tell the hypervisor they're used again At the point we've started using the pages again, we haven't *told* the host that we're using them. I think that's potentially a problem. Is qemu somehow cool with the guest touching pages that are supposed to be in the balloon and unusable? -- Dave