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.3 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 69CE7C433E0 for ; Mon, 25 Jan 2021 13:36:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E2259206C1 for ; Mon, 25 Jan 2021 13:36:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2259206C1 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 591758D0002; Mon, 25 Jan 2021 08:36:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 53FDB8D0001; Mon, 25 Jan 2021 08:36:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 455768D0002; Mon, 25 Jan 2021 08:36:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id 2F8798D0001 for ; Mon, 25 Jan 2021 08:36:25 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id DD2F4181AEF21 for ; Mon, 25 Jan 2021 13:36:24 +0000 (UTC) X-FDA: 77744396688.22.juice37_31143c027586 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id BE27A18038E73 for ; Mon, 25 Jan 2021 13:36:24 +0000 (UTC) X-HE-Tag: juice37_31143c027586 X-Filterd-Recvd-Size: 1875 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Mon, 25 Jan 2021 13:36:24 +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 4FF5AAC45; Mon, 25 Jan 2021 13:36:23 +0000 (UTC) Date: Mon, 25 Jan 2021 14:36:20 +0100 From: Oscar Salvador To: David Hildenbrand Cc: akpm@linux-foundation.org, mhocko@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, vbabka@suse.cz, pasha.tatashin@soleen.com Subject: Re: [PATCH 2/5] mm,memory_hotplug: Allocate memmap from the added memory range Message-ID: <20210125133544.GA31473@linux> References: <20201217130758.11565-1-osalvador@suse.de> <20201217130758.11565-3-osalvador@suse.de> <21079c2d-67d0-fc59-8d7f-0795b3f8a3e3@redhat.com> <20210125103951.GA27851@linux> <20210125105557.GA28363@linux> <64b0dca6-4460-ec6c-66f6-88db24ec288f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64b0dca6-4460-ec6c-66f6-88db24ec288f@redhat.com> 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 Mon, Jan 25, 2021 at 12:02:53PM +0100, David Hildenbrand wrote: > Assume you have two consecutive memory blocks with 56 sizeof(struct page). > The first one allocates a PMD (2097152) but only consumes 1835008, the second > one reuses the remaining part and allocates another PMD (1835008), > only using parts of it. > > Ripping out a memory block, along with the PMD in the vmemmap would > remove parts of the vmemmap of another memory block. Bleh, yeah, I was confused, you are right. > You might want to take a look at: Thanks a lot for the hints, I will have a look ;-) -- Oscar Salvador SUSE L3