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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 EF771C433E0 for ; Thu, 18 Mar 2021 08:28:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C353264F04 for ; Thu, 18 Mar 2021 08:28:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbhCRI2L (ORCPT ); Thu, 18 Mar 2021 04:28:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:37096 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbhCRI1w (ORCPT ); Thu, 18 Mar 2021 04:27:52 -0400 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 0D170AC1E; Thu, 18 Mar 2021 08:27:51 +0000 (UTC) Date: Thu, 18 Mar 2021 09:27:48 +0100 From: Oscar Salvador To: David Hildenbrand Cc: Andrew Morton , Michal Hocko , Anshuman Khandual , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/5] mm,memory_hotplug: Allocate memmap from the added memory range Message-ID: References: <20210309175546.5877-1-osalvador@suse.de> <20210309175546.5877-2-osalvador@suse.de> <20210315102224.GA24699@linux> <20210317140847.GA20407@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 03:35:41PM +0100, David Hildenbrand wrote: > Just assume you have two ranges > > [ ZONE_DEVICE 0 ][ ZONE_DEVICE 1] > > If the vmemmap of ZONE_DEVICE 1 could be taken from the altmap of > ZONE_DEVICE 0, we could be in trouble, as both parts can be > removed/repurposed independently ... I have to say my knowledge about ZONE_DEVICE and its intrinsencs tend to 0, that is why I thought it might not matter, but I agree that this is only asking for trouble. > If we check for > > IS_ALIGNED(nr_vmemmap_pages, PMD_SIZE), please add a proper TODO comment > that this is most probably the wrong place to take care of this. Sure, I will stuff the check in there and place a big TODO comment so we do not forget about addressing this issue the right way. I will prepare a v5 (hopefully the last one) and do some more testing before sending it out. Thanks David! -- Oscar Salvador SUSE L3