Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754536AbdLDOFM (ORCPT ); Mon, 4 Dec 2017 09:05:12 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:39741 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754281AbdLDOFG (ORCPT ); Mon, 4 Dec 2017 09:05:06 -0500 X-Google-Smtp-Source: AGs4zMZFOlzq6fbRvDHkwoxrb/3tKXoX6Nq0Rev49bYDJDl+TgMPSiPI6DizG+ArqiJumh80ovTiZEaxSpcmfzevm1s= MIME-Version: 1.0 In-Reply-To: <20171204112855.GA6373@samekh> References: <4e21a27570f665793debf167c8567c6752116d0a.1511433386.git.ar@linux.vnet.ibm.com> <20171129004913.GB1469@linux-l9pv.suse> <20171129015229.GD1469@linux-l9pv.suse> <20171204112855.GA6373@samekh> From: "Rafael J. Wysocki" Date: Mon, 4 Dec 2017 15:05:05 +0100 X-Google-Sender-Auth: PiVeJnFqAbNEW630nju-F8uPZzs Message-ID: Subject: Re: [PATCH v2 2/5] mm: memory_hotplug: Remove assumption on memory state before hotremove To: Andrea Reale Cc: joeyli , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , Linux Memory Management List , m.bielski@virtualopensystems.com, arunks@qti.qualcomm.com, Mark Rutland , scott.branden@broadcom.com, Will Deacon , qiuxishi@huawei.com, Catalin Marinas , Michal Hocko , Rafael Wysocki , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 29 On Mon, Dec 4, 2017 at 12:28 PM, Andrea Reale wrote: > Hi Joey, > > and thanks for your comments. Response inline: > [cut] >> >> So, the BUG() is useful to capture state issue in memory subsystem. But, I >> understood your concern about the two steps offline/remove from userland. >> >> Maybe we should move the BUG() to somewhere but not just remove it. Or if >> we think that the BUG() is too intense, at least we should print out a error >> message, and ACPI should checks the return value from subsystem to >> interrupt memory-hotplug process. > > In this patchset, BUG() is moved to acpi_memory_remove_memory(), > the caller of arch_remove_memory(). However, I agree with Michal, that > we should not BUG() here but rather halt the hotremove process and print > some errors. > Is there any state in ACPI that should be undone in case of hotremove > errors or we can just stop the process "halfway"? I have to recall a couple of things before answering this question, so that may take some time. Thanks, Rafael