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 57931C433DB for ; Mon, 25 Jan 2021 13:41:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 113AB221FB for ; Mon, 25 Jan 2021 13:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728986AbhAYNkh (ORCPT ); Mon, 25 Jan 2021 08:40:37 -0500 Received: from mx2.suse.de ([195.135.220.15]:36126 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728941AbhAYNhN (ORCPT ); Mon, 25 Jan 2021 08:37:13 -0500 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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