From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWyjW-0004NL-05 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 23:29:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWyjQ-0007xZ-V3 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 23:29:09 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:49320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWyjQ-0007vk-9S for qemu-devel@nongnu.org; Tue, 01 Sep 2015 23:29:04 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 Sep 2015 08:59:00 +0530 Date: Wed, 2 Sep 2015 08:58:54 +0530 From: Bharata B Rao Message-ID: <20150902032854.GA31862@in.ibm.com> References: <1440387111-23689-1-git-send-email-bharata@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1440387111-23689-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC PATCH v0] spapr: Disable memory hotplug when HTAB size is insufficient Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Nathan Fontenot , khandual@linux.vnet.ibm.com, qemu-ppc@nongnu.org, mdroth@linux.vnet.ibm.com, david@gibson.dropbear.id.au On Mon, Aug 24, 2015 at 09:01:51AM +0530, Bharata B Rao wrote: > The hash table size allocated to guest depends on the maxmem size. > If the host isn't able to allocate the required hash table size but > instead allocates less than the optimal requested size, then it will > not be possible to grow the RAM until maxmem via memory hotplug. > Attempts to hotplug memory till maxmem could fail and this failure > isn't being currently handled gracefully by the guest kernel thereby > causing guest kernel oops. > > This should eventually get fixed when we move to completely in-kernel > memory hotplug instead of the current method where userspace tool drmgr > drives the hotplug. Until the in-kernel memory hotplug is available > for PowerKVM, disable memory hotplug when requested hash table size > isn't allocated. David - Do you have any views on how to go about this ? Due to the way we do hotplug currently using drmgr, it appears that it is very difficult to have a graceful recovery within the guest kernel when memory hotplug request can't be fulfilled due to insufficient HTAB size. (Anshuman can elaborate on this with the exact description on why it is so hard to recover). Do you think disabling memory hotplug upfront is a reasonable workaround for this problem ? Nathan - When you enable in-kernel memory hotplug for PowerKVM, will you be exporting something for the userspace (capability ?) to check and determine the presense of in-kernel memory hotplug feature so that we can depend on graceful recovery instead of upfront disablement of memory hotplug from QEMU ? Regards, Bharata.