From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] KVM simplified virtio balloon driver Date: Sat, 19 Jan 2008 22:24:33 -0200 Message-ID: <20080120002433.GA6880@dmt> 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> <47927BB7.7060805@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm-devel , Avi Kivity , virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Anthony Liguori Return-path: Content-Disposition: inline In-Reply-To: <47927BB7.7060805-rdkfGonbjUSkNkDKm+mE6A@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 On Sat, Jan 19, 2008 at 04:37:43PM -0600, Anthony Liguori wrote: > 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). Also, the simplified driver does not handle errors at all. I don't think that assuming madvise() can't fail is a good thing. ------------------------------------------------------------------------- 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/