From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akXt2-0002sF-Sa for qemu-devel@nongnu.org; Mon, 28 Mar 2016 10:11:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akXsy-00034f-Ii for qemu-devel@nongnu.org; Mon, 28 Mar 2016 10:11:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akXsy-00034b-BI for qemu-devel@nongnu.org; Mon, 28 Mar 2016 10:11:16 -0400 References: <1459138565-6244-1-git-send-email-jitendra.kolhe@hpe.com> From: Eric Blake Message-ID: <56F93B80.8090803@redhat.com> Date: Mon, 28 Mar 2016 08:11:12 -0600 MIME-Version: 1.0 In-Reply-To: <1459138565-6244-1-git-send-email-jitendra.kolhe@hpe.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gAssRqtmFQCqh0GrwHhKkdwVI5HFqNCcc" 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: Jitendra Kolhe , qemu-devel@nongnu.org Cc: JBottomley@Odin.com, ehabkost@redhat.com, crosthwaite.peter@gmail.com, simhan@hpe.com, quintela@redhat.com, armbru@redhat.com, lcapitulino@redhat.com, borntraeger@de.ibm.com, mst@redhat.com, mohan_parthasarathy@hpe.com, stefanha@redhat.com, den@openvz.org, amit.shah@redhat.com, pbonzini@redhat.com, dgilbert@redhat.com, rth@twiddle.net This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gAssRqtmFQCqh0GrwHhKkdwVI5HFqNCcc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/27/2016 10:16 PM, Jitendra Kolhe wrote: > While measuring live migration performance for qemu/kvm guest, it > was observed that the qemu doesn=E2=80=99t maintain any intelligence fo= r the > guest ram pages which are released by the guest balloon driver and > treat such pages as any other normal guest ram pages. This has direct > impact on overall migration time for the guest which has released > (ballooned out) memory to the host. >=20 > In case of large systems, where we can configure large guests with 1TB > and with considerable amount of memory release by balloon driver to the= , > host the migration time gets worse. s/the, host/the host,/ >=20 > The optimization gets temporarily disabled, if the balloon operation is= s/disabled,/disabled/ > in progress. Since the optimization skips scanning and migrating contro= l > information for ballooned out pages, we might skip guest ram pages in > cases where the guest balloon driver has freed the ram page to the gues= t > but not yet informed the host/qemu about the ram page > (VIRTIO_BALLOON_F_MUST_TELL_HOST). In such case with optimization, we > might skip migrating ram pages which the guest is using. Since this > problem is specific to balloon leak, we can restrict balloon operation = in > progress check to only balloon leak operation in progress check. >=20 > The optimization also get permanently disabled (for all subsequent s/get/gets/ > migrations) in case any of the migration uses postcopy capability. In c= ase > of postcopy the balloon bitmap would be required to send after vm_stop,= > which has significant impact on the downtime. Moreover, the application= s > in the guest space won=E2=80=99t be actually faulting on the ram pages = which are > already ballooned out, the proposed optimization will not show any > improvement in migration time during postcopy. >=20 > Signed-off-by: Jitendra Kolhe > --- > Changed in v2: > - Resolved compilation issue for qemu-user binaries in exec.c > - Localize balloon bitmap test to save_zero_page(). > - Updated version string for newly added migration capability to 2.7. > - Made minor modifications to patch commit text. I'll leave the technical review to others. > +++ b/qapi-schema.json > @@ -544,11 +544,14 @@ > # been migrated, pulling the remaining pages along as needed.= NOTE: If > # the migration fails during postcopy the VM will fail. (sin= ce 2.6) > # > +# @skip-balloon: Skip scanning ram pages released by virtio-balloon dr= iver. > +# (since 2.7) > +# > # Since: 1.2 > ## > { 'enum': 'MigrationCapability', > 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', > - 'compress', 'events', 'postcopy-ram'] } > + 'compress', 'events', 'postcopy-ram', 'skip-balloon'] } Does this flag make sense to always have enabled (in which case we don't need it as a flag), or are there cases where we'd explicitly want to disable it? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gAssRqtmFQCqh0GrwHhKkdwVI5HFqNCcc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW+TuAAAoJEKeha0olJ0NqGtsH/jGZRLcDwYZVQWOWgk4/LepG 9ziwFjqYXZQTQpAQZdZSRCcEuXFEgnXSDYYHa9Iz6kT/lOYGCbRqn2rsIbU+YIsH x4ali0amNz9XUL9rMPiaEyDB9VgthCJ4+m9DTb+D3Xx4VWDwxZKzbOnfzB4lgutw dp7Jo42ZH50xkKoIYKvNLmWYaPXRkMD2pnbTPfHd+78dTUvbrcyqQ9+qtVAdBVcr POF3aMqYEEhxy6wYhlPypCufwdI58TCRNsWQ4dJKCkdoAUiM3OLtFul3EKcq6vAZ R4nyD1TuMBItitygeNRMDep9JPS8uLS40kZNLPR49KJ7XJYgNVz3ObuoN5agH5U= =ClQz -----END PGP SIGNATURE----- --gAssRqtmFQCqh0GrwHhKkdwVI5HFqNCcc--