From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDCiv-0007ym-Uq for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:22:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDCis-00016o-B2 for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:22:49 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:34714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDCis-00016K-35 for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:22:46 -0400 Received: by wgov12 with SMTP id v12so40416193wgo.1 for ; Thu, 09 Jul 2015 07:22:44 -0700 (PDT) Date: Thu, 9 Jul 2015 16:22:41 +0200 From: Eduardo Otubo Message-ID: <20150709142241.GA20671@vader> References: <20150630080752.GB22813@vader> <20150630111821.14e2bb54@nial.brq.redhat.com> <20150630135613.GB19986@vader> <20150630175602.37641467@igors-macbook-pro.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <20150630175602.37641467@igors-macbook-pro.local> Subject: Re: [Qemu-devel] mem1 is in use, can not be deleted List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: Qemu-devel --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 30, 2015 at 05=3D56=3D02PM +0200, Igor Mammedov wrote: > On Tue, 30 Jun 2015 15:56:13 +0200 > Eduardo Otubo wrote: >=20 > > On Tue, Jun 30, 2015 at 11=3D18=3D21AM +0200, Igor Mammedov wrote: > > > On Tue, 30 Jun 2015 10:07:52 +0200 > > > Eduardo Otubo wrote: > > >=20 > > > > Hello all, > > > >=20 > > > > I compiled the HEAD of the master branch and was testing memory > > > > hotunplug and got to this issue. Note: I followed exactly what's > > > > written on the docs/memory-hotplug.txt file. > > > >=20 > > > > QEMU 2.3.50 monitor - type 'help' for more information > > > > (qemu) object_add memory-backend-ram,id=3Dmem1,size=3D1G > > > > object_add memory-backend-ram,id=3Dmem1,size=3D1G > > > > (qemu) device_add pc-dimm,id=3Ddimm1,memdev=3Dmem1 > > > > device_add pc-dimm,id=3Ddimm1,memdev=3Dmem1 > > > > (qemu) device_del dimm1 > > > > device_del dimm1 > > > > (qemu) object_del mem1 > > > > object_del mem1 > > > > mem1 is in use, can not be deleted > > >=20 > > > probably because dimm1 isn't deleted, > > > you can check it in monitor using command "info memory-devices" > >=20 > > Yes, you're right. The reason is surely because dimm1 wasn't deleted > > -- and I think I didn't make my point very clear -- my question was > > more about: Is there any reason for dimm1 not being deleted? The > > reason why I tested with the guest OS fully running and on GRUB is > > because I guessed the guest OS was using this memory and couldn't be > > deallocated. If that's the case, and qemu did a best effort to remove > > and couldn't because guest was using it, then Ok, I just need to > > adapt my tests. Other than that perhaps I hit a bug. > Guest OS has to: > 1. support memory hot remove How do I know if guest OS supports memory hot remove? I'm testing on Debian 8 with kernel 4.1. I start qemu with "-m 2G,slots=3D32,maxmem=3D8G". > 2. eject memory device using ACPI _EJ0 method, once it has handled > removal request, provided it is able to free corresponding memory pages > See docs they should have flows described for success and failure case. When I issue the command "device_del dimm1" I see no output on dmesg on the guest OS. I guess this is a sign that perhaps the guest does not support it? =46rom the (very nice) diagram I found at docs/specs/acpi_mem_hotplug.txt, Qemu QMP should output some sort of failure if Guest OS fails to process ejection right? The only information I see is: (qemu) device_del dimm1 device_del dimm1 (qemu) info memory-devices info memory-devices Memory device [dimm]: "dimm1" addr: 0x100000000 slot: 0 node: 0 size: 1073741824 memdev: /objects/mem1 hotplugged: true hotpluggable: true (qemu) info memdev info memdev memory backend: 0 size: 1073741824 merge: true dump: true prealloc: false policy: default host nodes:=20 How was the environment when you tested this feature? Regards, --=20 Eduardo Otubo ProfitBricks GmbH --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVnoOxAAoJEP0M/1sS+L0vtZwIAKCzndglhxR8OMdEkViYqoMf 92S2pExYKkkOLaq5uGYmlYJjkKnKJ0kApCAVNudqf0DW2hR7gy8h4D35VVxwpegY 3u+qgzoB0b0xRopd9k+BpyyAtYYVsYGzI7JKHK9lHUUNHotcbCXms4e82yGVNke7 RM/Ib/GBdc5JFRrH2LqXw87fHxRtArml3yJrQ8sBJq2mQ2Jnyd37VOIubaZ5kmw+ p7FL35mrPvNVeszyLJhO7mVO3uE1jU3rtn0/zrO0TPTbYbgYL+NC11A+HbHCgOP3 yGUPs3OEz050XBmmePKZyGgdH20NE2vcQc+NMYNmwx81bt1BaknxDYrdFAdtnMg= =FK2q -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--