From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754265AbdCIWtF (ORCPT ); Thu, 9 Mar 2017 17:49:05 -0500 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:44407 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753949AbdCIWtD (ORCPT ); Thu, 9 Mar 2017 17:49:03 -0500 From: "Rafael J. Wysocki" To: Dan Williams Cc: Heiko Carstens , Andrew Morton , Linux MM , "linux-kernel@vger.kernel.org" , linux-s390 , Michal Hocko , Vladimir Davydov , Ben Hutchings , Gerald Schaefer , Martin Schwidefsky , Sebastian Ott Subject: Re: [PATCH 1/2] mm: add private lock to serialize memory hotplug operations Date: Thu, 09 Mar 2017 23:43:42 +0100 Message-ID: <9260906.bxXFooPL9U@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.10.0+; KDE/4.14.9; x86_64; ; ) In-Reply-To: References: <20170309130616.51286-1-heiko.carstens@de.ibm.com> <19605238.M7OFe3HAv5@aspire.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, March 09, 2017 02:37:55 PM Dan Williams wrote: > On Thu, Mar 9, 2017 at 2:22 PM, Rafael J. Wysocki wrote: > > On Thursday, March 09, 2017 11:15:47 PM Rafael J. Wysocki wrote: > >> On Thursday, March 09, 2017 10:10:31 AM Dan Williams wrote: > >> > On Thu, Mar 9, 2017 at 5:39 AM, Rafael J. Wysocki wrote: > [..] > >> > I *think* we're ok in this case because unplugging the CPU package > >> > that contains a persistent memory device will trigger > >> > devm_memremap_pages() to call arch_remove_memory(). Removing a pmem > >> > device can't fail. It may be held off while pages are pinned for DMA > >> > memory, but it will eventually complete. > >> > >> What about the offlining, though? Is it guaranteed that no memory from those > >> ranges will go back online after the acpi_scan_try_to_offline() call in > >> acpi_scan_hot_remove()? > > > > My point is that after the acpi_evaluate_ej0() in acpi_scan_hot_remove() the > > hardware is physically gone, so if anything is still doing DMA to that memory at > > that point, then the user is going to be unhappy. > > Hmm, ACPI 6.1 does not have any text about what _EJ0 means for ACPI0012. ACPI0012 is exceptional, but in general _EJ0 does not have to be present under a particular device for it to be affected. It can be under the device's parent, for example, in which case the entire subtree under a device with _EJ0 goes away in one go. And that very well may mean disconnect at the physical level (voltage goes away IOW). Thanks, Rafael