Received: from eggs.gnu.org ([2001:4830:134:3::10]:37003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4vZ-0002aP-77 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP4vV-0007jC-WF for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:33:28 -0400 References: <1468570225-14101-1-git-send-email-thuth@redhat.com> <20160718005236.GD16769@voom.fritz.box> <20160718105944.3908f7ca@bahia.lan> <9c8dae5e-d2bd-fa21-f12e-31fd21ca97bc@redhat.com> <20160718112650.4f831dd3@bahia.lan> From: Thomas Huth Message-ID: <928de718-79e1-9c8a-a05d-ed51e1e31a05@redhat.com> Date: Mon, 18 Jul 2016 11:33:16 +0200 MIME-Version: 1.0 In-Reply-To: <20160718112650.4f831dd3@bahia.lan> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Lk4umtF8DPkHMOq5k9vO7PJx3AtFTTw7U" Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Yet another fix for the huge page support detection mechanism List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: David Gibson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Lk4umtF8DPkHMOq5k9vO7PJx3AtFTTw7U Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 18.07.2016 11:26, Greg Kurz wrote: > On Mon, 18 Jul 2016 11:04:39 +0200 > Thomas Huth wrote: >=20 >> On 18.07.2016 10:59, Greg Kurz wrote: >>> On Mon, 18 Jul 2016 10:52:36 +1000 >>> David Gibson wrote: >>> =20 >>>> On Fri, Jul 15, 2016 at 10:10:25AM +0200, Thomas Huth wrote: =20 >>>>> Commit 86b50f2e1bef ("Disable huge page support if it is not availa= ble >>>>> for main RAM") already made sure that huge page support is not anno= unced >>>>> to the guest if the normal RAM of non-NUMA configurations is not ba= cked >>>>> by a huge page filesystem. However, there is one more case that can= go >>>>> wrong: NUMA is enabled, but the RAM of the NUMA nodes are not confi= gured >>>>> with huge page support (and only the memory of a DIMM is configured= with >>>>> it). When QEMU is started with the following command line for examp= le, >>>>> the Linux guest currently crashes because it is trying to use huge = pages >>>>> on a memory region that does not support huge pages: >>>>> >>>>> qemu-system-ppc64 -enable-kvm ... -m 1G,slots=3D4,maxmem=3D32G -ob= ject \ >>>>> memory-backend-file,policy=3Ddefault,mem-path=3D/hugepages,size=3D= 1G,id=3Dmem-mem1 \ >>>>> -device pc-dimm,id=3Ddimm-mem1,memdev=3Dmem-mem1 -smp 2 \ >>>>> -numa node,nodeid=3D0 -numa node,nodeid=3D1 >>>>> >>>>> To fix this issue, we've got to make sure to disable huge page supp= ort, >>>>> too, when there is a NUMA node that is not using a memory backend w= ith >>>>> huge page support. >>>>> >>>>> Fixes: 86b50f2e1befc33407bdfeb6f45f7b0d2439a740 >>>>> Signed-off-by: Thomas Huth >>>>> --- >>>>> target-ppc/kvm.c | 10 +++++++--- >>>>> 1 file changed, 7 insertions(+), 3 deletions(-) =20 >>>> >>>> Applied to ppc-for-2.7, thanks. >>>> =20 >>> >>> It looks like my replies to this patch were ignored... no big deal th= ough :) =20 >> >> I'll try to come up with an additional patch that fixes the remaining >> problem that you've found... Meanwhile, did you find out why you get >> that assertion that I was not able to recreate? Could you maybe post t= he >> exact command line to trigger that assertion? >> >=20 > I hit the assertion when I specify pc-dimm devices on the command line:= >=20 > qemu-system-ppc64 -enable-kvm ... -m 2G,slots=3D4,maxmem=3D32G \ > -object memory-backend-file,policy=3Ddefault,mem-path=3D/mnt/kvm_hugep= age,size=3D1G,id=3Dmem-mem1 \ > -device pc-dimm,id=3Ddimm-mem1,memdev=3Dmem-mem1 \ > -object memory-backend-file,policy=3Ddefault,mem-path=3D/mnt,size=3D1G= ,id=3Dmem-mem2 \ > -device pc-dimm,id=3Ddimm-mem2,memdev=3Dmem-mem2 \ > -smp 2 -numa node,nodeid=3D0,memdev=3Dmem-mem1 \ > -numa node,nodeid=3D1,memdev=3Dmem-mem2 FWIW, with that command line, I still don't get an assertion but a normal error message: qemu-system-ppc64: -device pc-dimm,id=3Ddimm-mem1,memdev=3Dmem-mem1: can'= t use already busy memdev: mem-mem1 Thomas --Lk4umtF8DPkHMOq5k9vO7PJx3AtFTTw7U 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.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXjKJiAAoJEC7Z13T+cC21qUQP/24mJtLMpUoi6wgX7osKNZb+ xLqSrnFTOU1bg5uOBMh+88sWfwHTLYEl0N/UWrkau9PD8OWqemUsK39OgddCEQ0T W1fHIlUd1CidmZiy7W1e9/A9qHCCRksTDLoxOrmm0sqpbamnxiNLPkV5b6ilBMCE UlTm3R0GVuxiMZv1BjCkbfFlVA3uUcf3mz2BQSNFP3SciJCKPWo90xoEhvUijFJq YxiItXO3hUPU5Jt7vSlKTAFbFPKoGQmAqNhqPldvENtNMXr6HWzXbdDgZC2XXcx0 dC1aRVDNMaKPao6vTQ9wWq7kjSLa80sjQn3qSCBN+zU7IRAX2LTf5YDmv3BRyCBB S7WffPjXqdTOys8B+WngIzgtiJZMc951gdw//1OitH4LtcKyhhdQm+tT5UAn7XxR yNxKbxY6yTlQb96MEe0jpUp3iNbYweVnLs9xqRhI3ADvC5L+o2cR8/NXzg1M5r8Q OYygd0kjXmeXrNsDd9Etf/n6QH5c4DBqimAnIqMwdl0U4pqnvbG7aEBzyNQf7elk JFKLcjTD4asiIyZUmViaFIWrNhc7BCUZr3MREjAcAoSGNIkIj3/e/O7IiYYOVlw+ YY6qBtYKOarR5nBc8n6/kAccydOIjfXi6iNngcWL3RtEarj7GtNca0SFIXzdsSFY ZNq3J4Otb43OjTeRWx4C =tv+I -----END PGP SIGNATURE----- --Lk4umtF8DPkHMOq5k9vO7PJx3AtFTTw7U--