From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR5Db-0001s2-Kc for qemu-devel@nongnu.org; Thu, 26 Feb 2015 15:39:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR5DX-0008Lw-Fj for qemu-devel@nongnu.org; Thu, 26 Feb 2015 15:39:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR5DX-0008Ls-7g for qemu-devel@nongnu.org; Thu, 26 Feb 2015 15:39:31 -0500 Message-ID: <54EF847F.1060703@redhat.com> Date: Thu, 26 Feb 2015 13:39:27 -0700 From: Eric Blake MIME-Version: 1.0 References: <1424972370-5029-1-git-send-email-den@openvz.org> <1424972370-5029-3-git-send-email-den@openvz.org> In-Reply-To: <1424972370-5029-3-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wpLg4bVqRt8baalb0ME0uAmjUWCuwpkBk" Subject: Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Anthony Liguori , qemu-devel@nongnu.org, Raushaniya Maksudova , "Michael S. Tsirkin" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wpLg4bVqRt8baalb0ME0uAmjUWCuwpkBk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/26/2015 10:39 AM, Denis V. Lunev wrote: > Excessive virtio_balloon inflation can cause invocation of OOM-killer, > when Linux is under severe memory pressure. Various mechanisms are > responsible for correct virtio_balloon memory management. Nevertheless = it > is often the case that these control tools does not have enough time to= > react on fast changing memory load. As a result OS runs out of memory a= nd > invokes OOM-killer. The balancing of memory by use of the virtio balloo= n > should not cause the termination of processes while there are pages in = the > balloon. Now there is no way for virtio balloon driver to free memory a= t > the last moment before some process get killed by OOM-killer. >=20 > This does not provide a security breach as balloon itself is running > inside Guest OS and is working in the cooperation with the host. Thus > some improvements from Guest side should be considered as normal. >=20 > To solve the problem, introduce a virtio_balloon callback which is > expected to be called from the oom notifier call chain in out_of_memory= () > function. If virtio balloon could release some memory, it will make the= > system to return and retry the allocation that forced the out of memory= s/to return/return/ > killer to run. >=20 > This behavior should be enabled if and only if appropriate feature bit > is set on the device. It is off by default. >=20 > This functionality was recently merged into vanilla Linux. >=20 > commit 5a10b7dbf904bfe01bb9fcc6298f7df09eed77d5 > Author: Raushaniya Maksudova > Date: Mon Nov 10 09:36:29 2014 +1030 >=20 > This patch adds respective control bits into QEMU. It introduces > deflate-on-oom option for baloon device which do the trick. s/baloon/balloon/ s/do/does/ I'll leave the content review to someone more familiar with the code. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wpLg4bVqRt8baalb0ME0uAmjUWCuwpkBk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU74R/AAoJEKeha0olJ0NqqgUIAKLU2iAxmKnj2QyIaL2zfQnS glYmHxJradWauPKZgmig6tnamKhEDXoo7gS1bbjHToSX7fePV6pCOrgk7koUF7yV GW50EYgzlqjK9b/q9Z64+7ayRiNRLJjlxpKAT6P0Rg4Ewaig6tqD9mhJ7zb9Hq/c p59ggZ760XHPtUXhfkQNzS5gYxer24wihyic5bTbNvKPevNKFEWtk4EDoQ817n3Q bNKTgkEC6l2yWG9lf4WUH4q4iLRxamdz424STxA9a9fc+UKz/arLc5ShRIiH40sF tLcAsB+hEvVtE8S2x2fUY4Pz6Hoa8mNM5nJa2ousJEYE6hdE9WMLt8s9Ng/jnvE= =dI4E -----END PGP SIGNATURE----- --wpLg4bVqRt8baalb0ME0uAmjUWCuwpkBk--