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 6E84EC433E0 for ; Thu, 18 Mar 2021 08:27:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BA5A264F38 for ; Thu, 18 Mar 2021 08:27:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA5A264F38 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 49AFE6B0070; Thu, 18 Mar 2021 04:27:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 44B426B0071; Thu, 18 Mar 2021 04:27:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 339806B0072; Thu, 18 Mar 2021 04:27:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0064.hostedemail.com [216.40.44.64]) by kanga.kvack.org (Postfix) with ESMTP id 1A8106B0070 for ; Thu, 18 Mar 2021 04:27:53 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C9A398249980 for ; Thu, 18 Mar 2021 08:27:52 +0000 (UTC) X-FDA: 77932316784.38.A719090 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf22.hostedemail.com (Postfix) with ESMTP id 4C2C2C0001FE for ; Thu, 18 Mar 2021 08:27:52 +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 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: X-Stat-Signature: dyjewxzna7gtedts78w36q4dwmbpo4nh X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4C2C2C0001FE Received-SPF: none (suse.de>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1616056072-64570 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, 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