From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDaKb-0000w5-7s for qemu-devel@nongnu.org; Fri, 10 Jul 2015 11:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDaKY-0001Ci-1K for qemu-devel@nongnu.org; Fri, 10 Jul 2015 11:35:17 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:33815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDaKX-0001Bo-L9 for qemu-devel@nongnu.org; Fri, 10 Jul 2015 11:35:13 -0400 Received: by wifm2 with SMTP id m2so49815679wif.1 for ; Fri, 10 Jul 2015 08:35:12 -0700 (PDT) Date: Fri, 10 Jul 2015 17:35:08 +0200 From: Eduardo Otubo Message-ID: <20150710153508.GA11936@vader> References: <20150630080752.GB22813@vader> <20150630111821.14e2bb54@nial.brq.redhat.com> <20150630135613.GB19986@vader> <20150630175602.37641467@igors-macbook-pro.local> <20150709142241.GA20671@vader> <20150710113010.1a9d405f@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <20150710113010.1a9d405f@nial.brq.redhat.com> 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 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > > > 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 remo= ve > > > > 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 > >=20 > > 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=3D= 8G". > kernel should be compiled with memory remove options Double checked that and yes, my guest kernel has memory hotplug support. >=20 > Also memory removal is allowed to fail if guest kernel is not able > to offline corresponding memory sections but it probably should notify > QEMU via ACPI about failure. How can I check this notification? >=20 >=20 > >=20 > > > 2. eject memory device using ACPI _EJ0 method, once it has handled > > > removal request, provided it is able to free corresponding memory pa= ges > > > See docs they should have flows described for success and failure cas= e. > >=20 > > 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? > >=20 > > From 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: > you need to use query-acpi-ospm-status command to see slot status. Yep, this command outputs that the dimm is still there, no news :/ >=20 > >=20 > > (qemu) device_del dimm1 > > device_del dimm1 > >=20 > > (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 > >=20 > > (qemu) info memdev > > info memdev > > memory backend: 0 > > size: 1073741824 > > merge: true > > dump: true > > prealloc: false > > policy: default > > host nodes:=20 > >=20 > > How was the environment when you tested this feature? > Most likely I've used RHEL7.1 as guest with latest systemd > which onlines hotplugged memory automatically on hotplug. I tried with Ubuntu 15.04, latest kernel 4.2 and systemd, still not working. I'm downloading CentOS-7, I'll setup with systemd and proper kernel configuration. I'll let you know the results. Thanks a lot for the help so far! :) --=20 Eduardo Otubo ProfitBricks GmbH --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVn+YsAAoJEP0M/1sS+L0vErsH/RWtvLCxfyK40hiA72CCRpDQ qHAPjB3k2bsIsAyBKwXTznnW2bHfxY79BZTJIv4R4FbpiXixSO5sWTjT8yGR7a7+ 85JTMnLOwslDG1ulvcirTUhoN1mUlcanMUS07PjHIsY9vf8ZOKzTNBsAOyyQwXZ7 kLveX1mqhvcS4XbINEIQEmMg91psTRUOwEVxSFCXMec3nfF4Nv8Y+Cbo2fxOfqcU 5rH0xl8dijayta4kE0nFxXTU7jngwEqqJ2me4LDpb7MCf8a1TTAJGfGjdj4QzrKl uQayORkMemd+lpPY/HLJKiO88X5dlprow4tS2n3b1E/LMsMgdiCRg3WvpCYzOtk= =aEVV -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--