From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIhQh-0001Nc-Sn for qemu-devel@nongnu.org; Tue, 03 Feb 2015 12:38:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIhQc-0001Ff-Pv for qemu-devel@nongnu.org; Tue, 03 Feb 2015 12:38:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIhQc-0001FR-Gg for qemu-devel@nongnu.org; Tue, 03 Feb 2015 12:38:22 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t13HcLwe031250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 3 Feb 2015 12:38:21 -0500 Date: Tue, 3 Feb 2015 17:38:16 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20150203173815.GL2332@work-vm> References: <20150203170925.GK2332@work-vm> <1032377914.4158867.1422984992735.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1032377914.4158867.1422984992735.JavaMail.zimbra@redhat.com> Subject: Re: [Qemu-devel] balloon vs postcopy migrate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pankaj Gupta Cc: Amit Shah , aarcange@redhat.com, Luiz Capitulino , qemu-devel@nongnu.org, gal@redhat.com * Pankaj Gupta (pagupta@redhat.com) wrote: > > > Hi, > > Andrea pointed out there is a risk that a guest inflating its > > balloon during a postcopy migrate could cause us problems, and > > I wanted to see what the best way of avoiding the problem was. > > > > Guests inflating there balloon cause an madvise(MADV_DONTNEED) on > > the host, marking pages as not present, that will potentially trigger > > a userfault, that we are using in postcopy to detect pages that need > > to be fetched from the source. > > > > In theory, at the moment guests *should* only ask for a balloon > > inflation if they've been asked to do so by the host; however there > > are no guards for that, and it's been suggested giving the > > guest more freedom might be a good idea anyway. > > > > My alternatives seem to be: > > 1) Stop servicing the message queue from the guest so > > that we just don't notice the inflate messages until > > afterwards. (Easy for Qemu, not sure how the guests > > will like an unserviced queue). > > > > 2) I could keep servicing the queue and ignore the messages > > (Easy for everyone, not very nice in actual used memory - > > does it cause any long term problems other than that?) > > > > 3) I could keep servicing the queue but put the messages > > in a list somewhere that replay after migrate has finished. > > (That list sounds bounded only in a very large way?) > > > > Thoughts? > > Can we have some global flag somewhere when Post copy is ON/active. > And we can ignore or defer only inflate/ballon messages/commands while > servicing the commands with some warnings. > > Just my thought on logic. Not sure if I am missing some background here. Oh yes, the global flag is the easy part; the only question is what the best thing to do is when it's set. Dave > > > > > Dave > > > > -- > > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK