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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 2613DC433E0 for ; Sun, 14 Feb 2021 17:30:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA51D64E10 for ; Sun, 14 Feb 2021 17:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229768AbhBNR37 (ORCPT ); Sun, 14 Feb 2021 12:29:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:49562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbhBNR36 (ORCPT ); Sun, 14 Feb 2021 12:29:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3F4D064E08; Sun, 14 Feb 2021 17:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613323757; bh=Jg/hxcmrt1OLpohmuaNMK3aXYRGAXzsF42r6hglIF5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UsGftF9PDGm67w/5WT5j8t9iMoWYfNaHNsd5R6HJFCxy0YVyqILNCEKKf+d7cOYj7 RcW4fl3ClLfNcL/105tTwVg5ULS4lTZfmul2g5sDYU1SZZkaxg4gPI/cO+EgQSjEXZ NABBFOxxa9NirbHNGN9B2GeXGwBBiHd1OjbLAWVABjXfUihVIaktXF6VYqAxOMGbQJ JJavbprWtSxWSQzG33x3pZMRpH504tAJpRkhTNBU53HXgtFJqoyFVOD4P7upxSqexG T/JwZ8eIn+HFTDki9X1mCfZFeMJwWwJArgd2wmDwdZBDzqIEj3paOekTgAXD7oJMsx G0Gxbav60HoZg== Date: Sun, 14 Feb 2021 19:29:06 +0200 From: Mike Rapoport To: David Hildenbrand Cc: Andrew Morton , Andrea Arcangeli , Baoquan He , Borislav Petkov , Chris Wilson , "H. Peter Anvin" , Ingo Molnar , Linus Torvalds , =?utf-8?Q?=C5=81ukasz?= Majczak , Mel Gorman , Michal Hocko , Mike Rapoport , Qian Cai , "Sarvela, Tomi P" , Thomas Gleixner , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v5 1/1] mm: refactor initialization of struct page for holes in memory layout Message-ID: <20210214172906.GN242749@kernel.org> References: <20210208110820.6269-1-rppt@kernel.org> <5dccbc93-f260-7f14-23bc-6dee2dff6c13@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Feb 12, 2021 at 10:56:19AM +0100, David Hildenbrand wrote: > On 12.02.21 10:55, David Hildenbrand wrote: > > On 08.02.21 12:08, Mike Rapoport wrote: > > > +#ifdef CONFIG_SPARSEMEM > > > + /* > > > + * Sections in the memory map may not match actual populated > > > + * memory, extend the node span to cover the entire section. > > > + */ > > > + *start_pfn = round_down(*start_pfn, PAGES_PER_SECTION); > > > + *end_pfn = round_up(*end_pfn, PAGES_PER_SECTION); > > > > Does that mean that we might create overlapping zones when one node > > s/overlapping zones/overlapping nodes/ > > > starts in the middle of a section and the other one ends in the middle > > of a section? > > > Could it be a problem? (e.g., would we have to look at neighboring nodes > > when making the decision to extend, and how far to extend?) Having a node end/start in a middle of a section would be a problem, but in this case I don't see a way to detect how a node should be extended :( We can return to a v4 [1] without x86 modifications. With that we'll have struct pages corresponding to a hole in a middle of a zone with correct zone link and a good guess for the node. As for the pfn 0 on x86, it'll remain outside any node and zone, but since it was the case since, like forever, I think we can live with it. [1] https://lore.kernel.org/lkml/20210130221035.4169-1-rppt@kernel.org -- Sincerely yours, Mike.