Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758274Ab3ETVbt (ORCPT ); Mon, 20 May 2013 17:31:49 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:41827 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756561Ab3ETVbr (ORCPT ); Mon, 20 May 2013 17:31:47 -0400 Message-ID: <1369085505.5673.60.camel@misato.fc.hp.com> Subject: Re: [PATCH 5/5] ACPI / memhotplug: Drop unnecessary code From: Toshi Kani To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , LKML , Greg Kroah-Hartman , Wen Congyang , Tang Chen , Yasuaki Ishimatsu , Andrew Morton , Jiang Liu , Vasilis Liaskovitis , linux-mm@kvack.org Date: Mon, 20 May 2013 15:31:45 -0600 In-Reply-To: <1369079733.5673.58.camel@misato.fc.hp.com> References: <2250271.rGYN6WlBxf@vostro.rjw.lan> <2228904.eTtCrFuSan@vostro.rjw.lan> <1369070876.5673.51.camel@misato.fc.hp.com> <1726699.Z30ifEcQDQ@vostro.rjw.lan> <1369079733.5673.58.camel@misato.fc.hp.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4 (3.6.4-3.fc18) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2166 Lines: 68 On Mon, 2013-05-20 at 13:55 -0600, Toshi Kani wrote: > On Mon, 2013-05-20 at 21:47 +0200, Rafael J. Wysocki wrote: > > On Monday, May 20, 2013 11:27:56 AM Toshi Kani wrote: > > > On Sun, 2013-05-19 at 01:34 +0200, Rafael J. Wysocki wrote: > > > > From: Rafael J. Wysocki > > : > > > > > - lock_memory_hotplug(); > > > > - > > > > - /* > > > > - * we have offlined all memory blocks like this: > > > > - * 1. lock memory hotplug > > > > - * 2. offline a memory block > > > > - * 3. unlock memory hotplug > > > > - * > > > > - * repeat step1-3 to offline the memory block. All memory blocks > > > > - * must be offlined before removing memory. But we don't hold the > > > > - * lock in the whole operation. So we should check whether all > > > > - * memory blocks are offlined. > > > > - */ > > > > - > > > > - ret = walk_memory_range(start_pfn, end_pfn, NULL, > > > > - is_memblock_offlined_cb); > > > > - if (ret) { > > > > - unlock_memory_hotplug(); > > > > - return ret; > > > > - } > > > > - > > > > > > I think the above procedure is still useful for safe guard. > > > > But then it shoud to BUG_ON() instead of returning an error (which isn't very > > useful for anything now). > > Right since we cannot fail at that state. > > > > > - /* remove memmap entry */ > > > > - firmware_map_remove(start, start + size, "System RAM"); > > > > - > > > > - arch_remove_memory(start, size); > > > > - > > > > - try_offline_node(nid); > > > > > > The above procedure performs memory hot-delete specific operations and > > > is necessary. > > > > OK, I see. I'll replace this patch with something simpler, then. > > Thanks. > > > What about the other patches in the series? > > I will send you my comments later (a bit interrupted for other thing > now). Other patches look good. For patch 1/5 to 4/5: Acked-by: Toshi Kani Thanks, -Toshi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/