From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077AbdDJWVk (ORCPT ); Mon, 10 Apr 2017 18:21:40 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:53248 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752458AbdDJWVi (ORCPT ); Mon, 10 Apr 2017 18:21:38 -0400 From: "Rafael J. Wysocki" To: Michal Hocko Cc: Joey Lee , Jiri Kosina , Kani Toshimitsu , Len Brown , LKML , linux-acpi@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH] acpi: drop support for force_remove Date: Tue, 11 Apr 2017 00:15:42 +0200 Message-ID: <3644128.Y1GtXNQdkv@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.11.0-rc4+; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20170410171343.GO4618@dhcp22.suse.cz> References: <20170403074023.29121-1-mhocko@kernel.org> <20170410171343.GO4618@dhcp22.suse.cz> 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 Monday, April 10, 2017 07:13:44 PM Michal Hocko wrote: > On Mon 03-04-17 09:40:23, Michal Hocko wrote: > > From: Michal Hocko > > > > /sys/firmware/acpi/hotplug/force_remove was presumably added to support > > auto offlining in the past. This is, however, inherently dangerous for > > some hotplugable resources like memory. The memory offlining fails when > > the memory is still in use and cannot be dropped or migrated. If we > > ignore the failure we are basically allowing for subtle memory > > corruption or a crash. > > > > We have actually noticed the later while hitting BUG() during the memory > > hotremove (remove_memory): > > ret = walk_memory_range(PFN_DOWN(start), PFN_UP(start + size - 1), NULL, > > check_memblock_offlined_cb); > > if (ret) > > BUG(); > > > > it took us quite non-trivial time realize that the customer had > > force_remove enabled. Even if the BUG was removed here and we could > > propagate the error up the call chain it wouldn't help at all because > > then we would hit a crash or a memory corruption later and harder to > > debug. So force_remove is unfixable for the memory hotremove. We haven't > > checked other hotplugable resources to be prone to a similar problems. > > > > Remove the force_remove functionality because it is not fixable currently. > > Keep the sysfs file and report an error if somebody tries to enable it. > > Encourage users to report about the missing functionality and work with > > them with an alternative solution. > > > > Reviewed-by: Lee, Chun-Yi > > Signed-off-by: Michal Hocko > > ping on this? /shrug/ I'll apply it if nobody has any problems with it. Thanks, Rafael