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 14E18C433DB for ; Sun, 14 Feb 2021 17:29:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7CA7A64DCF for ; Sun, 14 Feb 2021 17:29:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CA7A64DCF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B02FE8D00D7; Sun, 14 Feb 2021 12:29:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A8C208D0060; Sun, 14 Feb 2021 12:29:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 951A38D00D7; Sun, 14 Feb 2021 12:29:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0118.hostedemail.com [216.40.44.118]) by kanga.kvack.org (Postfix) with ESMTP id 7AD138D0060 for ; Sun, 14 Feb 2021 12:29:19 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3A519180ACC31 for ; Sun, 14 Feb 2021 17:29:19 +0000 (UTC) X-FDA: 77817559638.13.board49_14141f427634 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 17E8B18140B7B for ; Sun, 14 Feb 2021 17:29:19 +0000 (UTC) X-HE-Tag: board49_14141f427634 X-Filterd-Recvd-Size: 3604 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Sun, 14 Feb 2021 17:29:18 +0000 (UTC) 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: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.