Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1077602ybh; Mon, 13 Jul 2020 08:49:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyICx12Pvuv8+DdcnzQE5fg7UCJgdWcNvKwx3AzP0YqSBclxTfDhcaBqJWS2+Sjnv5/+nrC X-Received: by 2002:a17:906:2318:: with SMTP id l24mr361090eja.291.1594655346924; Mon, 13 Jul 2020 08:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594655346; cv=none; d=google.com; s=arc-20160816; b=BFpY+TqKgWh7csSFT9cS0XgRXvtEEd9mgdguYWzu8FouE5pRfeop6fCxNzLhhV1jEw qNNZ0dN+9GdXlknFHf7A9eiBOIu27kAkuuTTQul7ixPod0B1Xyrd81zlAgRyiJvJF96Y rwkM/pAyKx9SHU6zH8R9yFb2fI67EM8gBSZHNqR/AQSdJg3GRjT/FF/urPLupOkdPTVG xG+tAlfic5Yd8JpKkOFQW3CiqfJdLTTPvbfWOQPpq+/FjhDaTD9aFjKisBW3QIuOq+7f GjdRIxXjeyBsA4bt4WjWLBmT0d5ILC1QD9OjoqpNFmHaLtzQP/7n32Ts+ydSGt/bKPxK TLFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=W36OcjXryM8jgoewQfeJp3IZBi2EgGKHyNoHZfcaUKg=; b=nTxq4sKaT8Slm4cBKWeWqUfxupj66lCxPRkQ1kQlARRqi0upW2iZuascKDv3GtHe2c gLki2ltTK71z7GJbjDvIZpC2omMcu8dzkCRngcv74dIbAIEuwj8M49i0D/g2rosjpBUT 8sKiT4QJMEMe7z7xnHrGTgi/k6W0XuG6vHSFZ+pYlHy2pD+tvdSJRweIWQ6lTo/Xo95N RxrwgjJ+aUfgZgH+5uVaEkONrsiWjS7p926bsw6lh7XuDtwTz7X5zaxdqMBCNR9RBco9 BCbTkjUZrDNuqg3Si+b971T5O0xEC5U49Xp7EIwY7wu/cWNbATtfD8SE4LxpoQgSqas+ BCPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NB7aPTPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si8837326ejw.122.2020.07.13.08.48.43; Mon, 13 Jul 2020 08:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NB7aPTPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729764AbgGMPsk (ORCPT + 99 others); Mon, 13 Jul 2020 11:48:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729902AbgGMPsj (ORCPT ); Mon, 13 Jul 2020 11:48:39 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE85C061794 for ; Mon, 13 Jul 2020 08:48:39 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id by13so14072761edb.11 for ; Mon, 13 Jul 2020 08:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W36OcjXryM8jgoewQfeJp3IZBi2EgGKHyNoHZfcaUKg=; b=NB7aPTPiP9qMPZ0y5PyZjEZciyC3DGD/+k/bgqBjuSVN7xIiMDgNbsaF6/pgADNch+ Ppp6lmsRYZBZaFrRPXfH/OKEHROSUnQaiibSBid42105KDuiFDu1QwTgOqxAL6c2lRjW MB7BlEtHL+kZqmH7hAMfNq/xbtRyDjIYnMpKNKQ38wZaBZBH3mGvzkSQ9nxlcL+jduGt GFhsoxForK/GfjOiwcjP4X5Npt3KHapXh9bsKOxwM98za+n3VD8+3bVQ2bTLNFDGInhy BOsBa2M/13YjYvQeW8U+bOZfC3IeaBPpjGLKUN+S0b/5sR0Bwju5V17YorGeaFaOIYCu VGKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W36OcjXryM8jgoewQfeJp3IZBi2EgGKHyNoHZfcaUKg=; b=cDgcvwaLqFJjaxK35NBynOoE0XIpxZxbrYbMZWSXHXVj5XIU3aUeQn6vxSDkpfiuhr gTxthnw7jkfvG06O6K2LRjqjH2s1n7G78WBr18uDertogByx6dfblnKikkL1THN0lvoM JzOWbG5Xj0AM7oAGaHXcH2hej6r8AcOjyaEXHgNfLhV5Hh4P0LBFUwUevlpzWD2WR57Z DrECpyaSHHxIUDPQtIhTl6Du06nCFnfQX8MAZajxYsOnVHLYoTxvB0dDX//DnioYiB+J 5LG13qX9XXj1N1/BzIzT5BLhxpvf1jR8xoO9eakNc5KVfGypjaZ71cfk/PZg2tyjscU4 TqDw== X-Gm-Message-State: AOAM531sBLibDCaYzhWX1f1khkLgoK6+r2M6TDrLiMk5/6r6Iw/Mu/tM DMxAbkvoK765fgFhpsHlejSoHMzzotyOKEAjUfB5FQ== X-Received: by 2002:aa7:d043:: with SMTP id n3mr73787edo.102.1594655318157; Mon, 13 Jul 2020 08:48:38 -0700 (PDT) MIME-Version: 1.0 References: <159457116473.754248.7879464730875147365.stgit@dwillia2-desk3.amr.corp.intel.com> <159457120893.754248.7783260004248722175.stgit@dwillia2-desk3.amr.corp.intel.com> <20200713070304.GC11000@linux.ibm.com> In-Reply-To: <20200713070304.GC11000@linux.ibm.com> From: Dan Williams Date: Mon, 13 Jul 2020 08:48:27 -0700 Message-ID: Subject: Re: [PATCH v2 08/22] memblock: Introduce a generic phys_addr_to_target_node() To: Mike Rapoport Cc: linux-nvdimm , Jia He , Will Deacon , David Hildenbrand , Andrew Morton , Peter Zijlstra , Vishal L Verma , Dave Hansen , Ard Biesheuvel , Linux MM , Linux Kernel Mailing List , Linux ACPI , Christoph Hellwig , Joao Martins Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 12:04 AM Mike Rapoport wrote: > > Hi Dan, > > On Sun, Jul 12, 2020 at 09:26:48AM -0700, Dan Williams wrote: > > Similar to how generic memory_add_physaddr_to_nid() interrogates > > memblock data for numa information, introduce > > get_reserved_pfn_range_from_nid() to enable the same operation for > > reserved memory ranges. Example memory ranges that are reserved, but > > still have associated numa-info are persistent memory or Soft Reserved > > (EFI_MEMORY_SP) memory. > > Here again, I would prefer to add a weak default for > phys_to_target_node() because the "generic" implementation is not really > generic. > > The fallback to reserved ranges is x86 specfic because on x86 most of the > reserved areas is not in memblock.memory. AFAIK, no other architecture > does this. True, I was pre-fetching ARM using the new EFI "Special Purpose" memory attribute. However, until that becomes something that platforms deploy in practice I'm ok with not solving that problem for now. > And x86 anyway has implementation of phys_to_target_node(). Sure, let's go with the default stub for non-x86. Justin, do you think it would make sense to fold your dax_kmem enabling for arm64 series into my enabling of dax_hmem for all memory-hotplug archs?