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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 36C13C4361B for ; Wed, 9 Dec 2020 11:51:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B714E23B77 for ; Wed, 9 Dec 2020 11:51:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B714E23B77 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9F26D8D001B; Wed, 9 Dec 2020 06:51:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 97B388D0019; Wed, 9 Dec 2020 06:51:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8447B8D001B; Wed, 9 Dec 2020 06:51:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 6F6C88D0019 for ; Wed, 9 Dec 2020 06:51:07 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3526B8249980 for ; Wed, 9 Dec 2020 11:51:07 +0000 (UTC) X-FDA: 77573577774.01.brass25_5f17e3a273ef Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 15D441004C79A for ; Wed, 9 Dec 2020 11:51:07 +0000 (UTC) X-HE-Tag: brass25_5f17e3a273ef X-Filterd-Recvd-Size: 2383 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Dec 2020 11:51:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 47CC4ACF1; Wed, 9 Dec 2020 11:51:05 +0000 (UTC) Date: Wed, 9 Dec 2020 12:51:02 +0100 From: Oscar Salvador To: David Hildenbrand Cc: mhocko@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, vbabka@suse.cz, pasha.tatashin@soleen.com Subject: Re: [RFC PATCH v3 2/4] mm,memory_hotplug: Allocate memmap from the added memory range Message-ID: <20201209115033.GA31745@linux> References: <20201201115158.22638-1-osalvador@suse.de> <20201201115158.22638-3-osalvador@suse.de> <0e53ae49-6b0a-0714-df0f-fd6183061752@redhat.com> <20201209103226.GC30892@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201209103226.GC30892@linux> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed, Dec 09, 2020 at 11:32:26AM +0100, Oscar Salvador wrote: > On Wed, Dec 02, 2020 at 11:05:53AM +0100, David Hildenbrand wrote: > > If you take a look at generic_online_page() there are some things that > > won't be done for our vmemmap pages > > > > 1. kernel_map_pages(page, 1 << order, 1); > > > > We're accessing these pages already when initializing the memmap. We > > might have to explicitly map these vmemmap pages at some point. Might > > require some thought. Did you test with debug pagealloc? > > I always try to run with all debug stuff enabled, but I definitely > did not enable debug_pagealloc. > I will have a look at it. > > > 2. totalram_pages_add(1UL << order); > > > > We should add/remove the vmemmap pages manually from totalram I guess. > > Yes, we should. That was a clear oversight. Looking closer, I do not think we have to account those into totalram. I might be mistaken but looking at memblock_free_all, it seems we only account to totalram_pages those ranges laying in memblock.memory filtering out memblock.reserved. And it seems that the pages we use for pglist_data structs (the ones we handle in register_page_bootmem_info_node) fall in memblock.reserved. -- Oscar Salvador SUSE L3