From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] KVM simplified virtio balloon driver Date: Sat, 19 Jan 2008 16:37:43 -0600 Message-ID: <47927BB7.7060805@codemonkey.ws> References: <20080114200357.GA18354@dmt> <20080115190102.GA27645@dmt> <1200525166.26281.103.camel@localhost.localdomain> <200801171245.59510.rusty@rustcorp.com.au> <4791A085.8060502__30665.5007684187$1200726687$gmane$org@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm-devel , virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <4791A085.8060502__30665.5007684187$1200726687$gmane$org-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Rusty Russell wrote: >> After discussions with Anthony Liguori, it seems that the virtio >> balloon can be made even simpler. Here's my attempt. >> >> Since the balloon requires Guest cooperation anyway, there seems >> little reason to force it to tell the Host when it wants to reuse a >> page. It can simply fault it in. >> >> > > Faulting is synchronous, while deflating is (or can be made) > asynchronous. If the host needs to do some work to get the memory, the > guest will be slowed down considerably. Good point. Basically, we have two page hinting operations which roughly correspond to madvise(MADV_DONTNEED) and madvise(MADV_WILLNEED). Regards, Anthony Liguori > If we have explicit deflate, the host can call madvise(MADV_WILLNEED) or > actually touch the pages before the guest accesses them. > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/