From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTjT3-0000Mf-HM for qemu-devel@nongnu.org; Mon, 24 Aug 2015 00:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTjT0-00018m-Bi for qemu-devel@nongnu.org; Mon, 24 Aug 2015 00:34:45 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:53200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTjSz-00011P-Mk for qemu-devel@nongnu.org; Mon, 24 Aug 2015 00:34:42 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 24 Aug 2015 10:04:37 +0530 Message-ID: <55DA9ED7.3010604@linux.vnet.ibm.com> Date: Mon, 24 Aug 2015 10:04:31 +0530 From: Anshuman Khandual MIME-Version: 1.0 References: <1440387111-23689-1-git-send-email-bharata@linux.vnet.ibm.com> In-Reply-To: <1440387111-23689-1-git-send-email-bharata@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v0] spapr: Disable memory hotplug when HTAB size is insufficient List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao , qemu-devel@nongnu.org Cc: Nathan Fontenot , qemu-ppc@nongnu.org, mdroth@linux.vnet.ibm.com, david@gibson.dropbear.id.au On 08/24/2015 09:01 AM, 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. Even when the in-kernel memory hotplug will be available on PKVM, it still makes sense to disable memory hotplug when the hash table size received from host is not sufficient for the permissible/ requested maximum memory size of the guest. Whats the point of enabling memory hotplug when we know it cannot fulfill all the memory hotplug request. IIUC, the hash table size received from the host some times can be greater than what is required for the current memory size and less than max hot pluggable memory on the guest. With this patch in that case we will disable memory hotplug but then why use hash table size which is bigger than required for the current memory size. We will not be doing *any* memory hotplug at all afterwards, so lets shrink the hash page size to what is just required for the current memory requested by the guest and save some RAM on the system.