From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp04.au.ibm.com (e23smtp04.au.ibm.com [202.81.31.146]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id CAF9F1A001E for ; Mon, 1 Feb 2016 17:30:25 +1100 (AEDT) Received: from localhost by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Feb 2016 16:30:24 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 0110D2CE8056 for ; Mon, 1 Feb 2016 17:30:20 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u116UBWk56754248 for ; Mon, 1 Feb 2016 17:30:19 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u116TkQ3023868 for ; Mon, 1 Feb 2016 17:29:47 +1100 Message-ID: <56AEFB45.2080002@linux.vnet.ibm.com> Date: Mon, 01 Feb 2016 11:59:25 +0530 From: Anshuman Khandual MIME-Version: 1.0 To: David Gibson , paulus@samba.org, mpe@ellerman.id.au, benh@kernel.crashing.org CC: aik@ozlabs.ru, lvivier@redhat.com, thuth@redhat.com, linuxppc-dev@lists.ozlabs.org Subject: Re: [RFCv2 4/9] arch/powerpc: Clean up memory hotplug failure paths References: <1454045043-25545-1-git-send-email-david@gibson.dropbear.id.au> <1454045043-25545-5-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1454045043-25545-5-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 01/29/2016 10:53 AM, David Gibson wrote: > This makes a number of cleanups to handling of mapping failures during > memory hotplug on Power: > > For errors creating the linear mapping for the hot-added region: > * This is now reported with EFAULT which is more appropriate than the > previous EINVAL (the failure is unlikely to be related to the > function's parameters) > * An error in this path now prints a warning message, rather than just > silently failing to add the extra memory. > * Previously a failure here could result in the region being partially > mapped. We now clean up any partial mapping before failing. > > For errors creating the vmemmap for the hot-added region: > * This is now reported with EFAULT instead of causing a BUG() - this > could happen for external reason (e.g. full hash table) so it's better > to handle this non-fatally > * An error message is also printed, so the failure won't be silent > * As above a failure could cause a partially mapped region, we now > clean this up. Yeah this greatly improves graceful fall back when when memory mapping failure happens at the last level during memory hotplug.