From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqJ67-0001ci-Vi for qemu-devel@nongnu.org; Wed, 13 Apr 2016 07:36:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqJ63-0005GA-0S for qemu-devel@nongnu.org; Wed, 13 Apr 2016 07:36:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqJ62-0005Fj-SZ for qemu-devel@nongnu.org; Wed, 13 Apr 2016 07:36:34 -0400 Date: Wed, 13 Apr 2016 14:36:28 +0300 From: "Michael S. Tsirkin" Message-ID: <20160413142542-mutt-send-email-mst@redhat.com> References: <1459138565-6244-1-git-send-email-jitendra.kolhe@hpe.com> <20160329151921-mutt-send-email-mst@redhat.com> <56FE56AC.8050903@hpe.com> <20160410184239-mutt-send-email-mst@redhat.com> <570E257F.3060205@hpe.com> <20160413111032.GA22137@redhat.com> <20160413111538.GA6367@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160413111538.GA6367@work-vm> Subject: Re: [Qemu-devel] [PATCH v2] migration: skip sending ram pages released by virtio-balloon driver. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: Jitendra Kolhe , qemu-devel@nongnu.org, pbonzini@redhat.com, crosthwaite.peter@gmail.com, rth@twiddle.net, eblake@redhat.com, lcapitulino@redhat.com, stefanha@redhat.com, armbru@redhat.com, quintela@redhat.com, den@openvz.org, JBottomley@Odin.com, borntraeger@de.ibm.com, amit.shah@redhat.com, ehabkost@redhat.com, mohan_parthasarathy@hpe.com, simhan@hpe.com On Wed, Apr 13, 2016 at 12:15:38PM +0100, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (mst@redhat.com) wrote: > > On Wed, Apr 13, 2016 at 04:24:55PM +0530, Jitendra Kolhe wrote: > > > Can we extend support for post-copy in a different patch set? > > > > If the optimization does not *help* on some paths, > > that's fine. The issue is with adding extra code > > special-casing protocols: > > > > + if (migrate_postcopy_ram()) { > > + balloon_bitmap_disable_state = BALLOON_BITMAP_DISABLE_PERMANENT; > > + } > > > > Generally when one sees that patchset breaks XYZ... > > the easy solution is "check for XYZ > > and disable the optimization". But do this enough times > > and the codebase becomes impossible to reason about. > > why did migration become slower? oh it enabled > > optimization A and that conflicts with optimization B ... > > Hang on; this is getting all very complicated; I wouldn't start tieing > this thing up with postcopy yet. Lets try and keep this simple for starters. > > Dave Absolutely, but I don't understand why is this implemented in such a complex way. 1. keep track of pages in balloon in a bitmap 2. put bitmap in a ram block 3. check that before sending page. if there - it's a zero page All the complexity is to avoid migrating an extra bit per page and it seems like a premature optimization to me at this stage. > > > > > > > and use > > > current patch set to support other remaining protocols? > > > > Even disregarding postcopy, I think there were > > comments that need to be addressed. > > > > -- > > MST > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK