From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751345AbdJCVeW (ORCPT ); Tue, 3 Oct 2017 17:34:22 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:36195 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbdJCVeV (ORCPT ); Tue, 3 Oct 2017 17:34:21 -0400 Subject: Re: [Xen-devel] [PATCH v3] xen/balloon: don't online new memory initially To: HW42 , Juergen Gross , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org References: <20170710081045.874-1-jgross@suse.com> <89348679-2db3-b1ea-f1e3-725493ac5ab8@ipsumj.de> From: Boris Ostrovsky Message-ID: Date: Tue, 3 Oct 2017 17:33:25 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <89348679-2db3-b1ea-f1e3-725493ac5ab8@ipsumj.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="baGxRvlfN9GWp3v2xHVIs9aFXJ6MRaFar" X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --baGxRvlfN9GWp3v2xHVIs9aFXJ6MRaFar Content-Type: multipart/mixed; boundary="XDbL9htnrJteT4iigN1bUsGrTK9oRE4d5"; protected-headers="v1" From: Boris Ostrovsky To: HW42 , Juergen Gross , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Message-ID: Subject: Re: [Xen-devel] [PATCH v3] xen/balloon: don't online new memory initially References: <20170710081045.874-1-jgross@suse.com> <89348679-2db3-b1ea-f1e3-725493ac5ab8@ipsumj.de> In-Reply-To: <89348679-2db3-b1ea-f1e3-725493ac5ab8@ipsumj.de> --XDbL9htnrJteT4iigN1bUsGrTK9oRE4d5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/02/2017 05:37 PM, HW42 wrote: > Juergen Gross: >> When setting up the Xenstore watch for the memory target size the new >> watch will fire at once. Don't try to reach the configured target size= >> by onlining new memory in this case, as the current memory size will >> be smaller in almost all cases due to e.g. BIOS reserved pages. >> >> Onlining new memory will lead to more problems e.g. undesired conflict= s >> with NVMe devices meant to be operated as block devices. >> >> Instead remember the difference between target size and current size >> when the watch fires for the first time and apply it to any further >> size changes, too. >> >> In order to avoid races between balloon.c and xen-balloon.c init calls= >> do the xen-balloon.c initialization from balloon.c. >> >> Signed-off-by: Juergen Gross > This patch seems to introduce a regression. If I boot a HVM or PVH > domain with memory !=3D maxmem then the kernel inside the domain report= s > that it has maxmem available even though Xen reports only what is set a= s > memory. Sooner or later Xen logs "out of PoD memory!" and kills the > domain. If I revert the corresponding commit (96edd61d) then everything= > works as expected. > > Tested this with Xen 4.9.0 and Linux 4.13.4. > Yes, this indeed doesn't look like it's doing the right thing (although I haven't seen the "out of memory" error). I wonder whether target_diff should be computed against xenstore's "static-max" and not "target" and the memory should be ballooned down immediately and not on a subsequent watch firing. Unfortunately Juergen is out for a couple of weeks and I'd like to hear from him first since he is the one who wrote this patch. -boris --XDbL9htnrJteT4iigN1bUsGrTK9oRE4d5-- --baGxRvlfN9GWp3v2xHVIs9aFXJ6MRaFar 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 iQIcBAEBCAAGBQJZ1AImAAoJEIredpCGysGycsoQAJy0Ogw6jX6TJdxXV6LClHnU JN8UFDc7uV3Jw1J8mSROC+qWzS1d7rfQl414CKRBYHqzUd1eGhlnKuXvPlfAxFgT v4dY6bG62lzycr2r9oWFenyYmDEl/DXiGHPRrIh8jyakRJf5XAvr6vpMNjfxDCw0 te3r7hGLe5kmHj6NAo5knrqIyXl2Z52QiBQ5/+BDclPsRpFBv2e9WRHhKmw9y+Rd +HkN6JHBxJ9oI8OWI2VWwUjRIGZSbpjnOKPCmwKX6+KCG2qfy4IZGR+l5v0rzSps QbUnPcRLwx2mGX7gZlQAZpDvkyjueJoL6kARfY5k2wiN0trp88W4FMTgG4+qBOF5 Z6GBaDe4rKOZxRO7z6PyGfJkwPL4/whrg9RHZpLjA0lE1o7OSdsqBFbJXDXIM0nf x/aMx8GpV1iDtmMW+ix42i6P3yYq6U2cFFDjibt7GrM/FBW0FleXQ3cuJ2jCiVZe Gzp2oWs0McjeoUhPubTP5lJwr8j9YxlFMcnIQlwlwy1W39V1DLqO5FZgX7kUzyDh d1m48MqXNG3GskvqVVQGo6xxQ6J16KrY5aG30xA+rC125nYha1DKnHsTsv13Mo03 buVd28AaRzqfI+/KLu7wff7RVWU3SZTBYuJf6qB6OEnSJj9V278XP+IGkxgbp7WQ k8yBD05jzv9YFJVRBe+k =HM15 -----END PGP SIGNATURE----- --baGxRvlfN9GWp3v2xHVIs9aFXJ6MRaFar--