From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6D80C43603 for ; Wed, 18 Dec 2019 20:18:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F83721D7D for ; Wed, 18 Dec 2019 20:18:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="LHrb6p+0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F83721D7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47dRCQ3MwqzDq8X for ; Thu, 19 Dec 2019 07:18:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux-foundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=akpm@linux-foundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="LHrb6p+0"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47dR945RPvzDqgf for ; Thu, 19 Dec 2019 07:16:08 +1100 (AEDT) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 857B52176D; Wed, 18 Dec 2019 20:16:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576700166; bh=72GdXtYxFBvJVwR5VB7dRffOmREfJyQl/Jzhr5XSzJU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LHrb6p+0jIBpxBhzaLr/plO8NRxeqdrxmRg8kgj3GwNUwA8IBxs9sotd6puBVEcx9 FfJzC1Eur7dCKq91VQ7+sRk/CgZhK+3a6gblwiOnh/QtBz2ykb5oixG62lAmSAPAmn 10siaDVAeFZLKt6tWbQ8Z8kTKlouGLaDGXQJZWKM= Date: Wed, 18 Dec 2019 12:16:04 -0800 From: Andrew Morton To: David Hildenbrand Subject: Re: [PATCH v6 05/10] mm/memory_hotplug: Shrink zones when offlining memory Message-Id: <20191218121604.520927a74bbe65d47669b32a@linux-foundation.org> In-Reply-To: <4a3d7420-2d11-a37c-0e82-2096fbf7bca6@redhat.com> References: <20191006085646.5768-1-david@redhat.com> <20191006085646.5768-6-david@redhat.com> <20191130152159.258fa331542fc693e24723eb@linux-foundation.org> <4a3d7420-2d11-a37c-0e82-2096fbf7bca6@redhat.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Rich Felker , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , Catalin Marinas , Dave Hansen , Heiko Carstens , Wei Yang , linux-mm@kvack.org, Michal Hocko , Paul Mackerras , "H. Peter Anvin" , Will Deacon , Dan Williams , linux-s390@vger.kernel.org, Yu Zhao , Yoshinori Sato , Halil Pasic , Jason Gunthorpe , x86@kernel.org, "Matthew Wilcox \(Oracle\)" , Mike Rapoport , Jun Yao , Christian Borntraeger , Ingo Molnar , Gerald Schaefer , Ira Weiny , Fenghua Yu , Pavel Tatashin , Vasily Gorbik , Anshuman Khandual , Masahiro Yamada , Greg Kroah-Hartman , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Oscar Salvador , Tony Luck , Steve Capper , Robin Murphy , linux-kernel@vger.kernel.org, Logan Gunthorpe , "Aneesh Kumar K.V" , Qian Cai , Tom Lendacky , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, 18 Dec 2019 18:08:04 +0100 David Hildenbrand wrote: > On 01.12.19 00:21, Andrew Morton wrote: > > On Sun, 27 Oct 2019 23:45:52 +0100 David Hildenbrand wrote: > > > >> I think I just found an issue with try_offline_node(). > >> try_offline_node() is pretty much broken already (touches garbage > >> memmaps and will not considers mixed NIDs within sections), however, > >> relies on the node span to look for memory sections to probe. So it > >> seems to rely on the nodes getting shrunk when removing memory, not when > >> offlining. > >> > >> As we shrink the node span when offlining now and not when removing, > >> this can go wrong once we offline the last memory block of the node and > >> offline the last CPU. We could still have memory around that we could > >> re-online, however, the node would already be offline. Unlikely, but > >> possible. > >> > >> Note that the same is also broken without this patch in case memory is > >> never onlined. The "pfn_to_nid(pfn) != nid" can easily succeed on the > >> garbage memmap, resulting in no memory being detected as belonging to > >> the node. Also, resize_pgdat_range() is called when onlining memory, not > >> when adding it. :/ Oh this is so broken :) > >> > >> The right fix is probably to walk over all memory blocks that could > >> exist and test if they belong to the nid (if offline, check the > >> block->nid, if online check all pageblocks). A fix we can then move in > >> front of this patch. > >> > >> Will look into this this week. > > > > And this series shows almost no sign of having been reviewed. I'll hold > > it over for 5.6. > > > > Hi Andrew, any chance we can get the (now at least reviewed - thx Oscar) > fix in patch #5 into 5.5? (I want to do the final stable backports for > the uninitialized memmap stuff) Sure, I queued it for the next batch of 5.5 fixes.