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=-0.8 required=3.0 tests=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 752C5C32771 for ; Wed, 22 Jan 2020 03:20:42 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48F2224672 for ; Wed, 22 Jan 2020 03:20:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48F2224672 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4CCAF1007B8DD; Tue, 21 Jan 2020 19:24:00 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7A0691007B8C8 for ; Tue, 21 Jan 2020 19:23:57 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 19:20:38 -0800 X-IronPort-AV: E=Sophos;i="5.70,347,1574150400"; d="scan'208";a="229133166" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 19:20:38 -0800 Subject: [PATCH v4 0/6] Memory Hierarchy: Enable target node lookups for reserved memory From: Dan Williams To: tglx@linutronix.de, mingo@redhat.com Date: Tue, 21 Jan 2020 19:04:35 -0800 Message-ID: <157966227494.2508551.7206194169374588977.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Message-ID-Hash: GVQSDSOQE5SWYSCZ6TSYGMVK5LLXITZO X-Message-ID-Hash: GVQSDSOQE5SWYSCZ6TSYGMVK5LLXITZO X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: David Hildenbrand , Borislav Petkov , "Rafael J. Wysocki" , "H. Peter Anvin" , "Aneesh Kumar K.V" , kbuild test robot , Andrew Morton , Peter Zijlstra , Benjamin Herrenschmidt , Michal Hocko , Paul Mackerras , Christoph Hellwig , Dave Hansen , Michael Ellerman , x86@kernel.org, Andy Lutomirski , linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Changes since v3 [1]: - Cleanup numa_map_to_online_node() to remove redundant "if (!node_online(node))" (Aneesh) [1]: http://lore.kernel.org/r/157954696789.2239526.17707265517154476652.stgit@dwillia2-desk3.amr.corp.intel.com --- Merge notes: x86 folks: This has an ack from Rafael for ACPI, and Michael for Power. With an x86 ack I plan to take this through the libnvdimm tree provided the x86 touches look ok to you. --- Cover: Arrange for platform numa info to be preserved for determining 'target_node' data. Where a 'target_node' is the node a reserved memory range will become when it is onlined. This new infrastructure is expected to be more valuable over time for Memory Tiers / Hierarchy management as more platforms (via the ACPI HMAT and EFI Specific Purpose Memory) publish reserved or "soft-reserved" ranges to Linux. Linux system administrators will expect to be able to interact with those ranges with a unique numa node number when/if that memory is onlined via the dax_kmem driver [2]. One configuration that currently fails to properly convey the target node for the resulting memory hotplug operation is persistent memory defined by the memmap=nn!ss parameter. For example, today if node1 is a memory only node, and all the memory from node1 is specified to memmap=nn!ss and subsequently onlined, it will end up being onlined as node0 memory. As it stands, memory_add_physaddr_to_nid() can only identify online nodes and since node1 in this example has no online cpus / memory the target node is initialized node0. The fix is to preserve rather than discard the numa_meminfo entries that are relevant for reserved memory ranges, and to uplevel the node distance helper for determining the "local" (closest) node relative to an initiator node. [2]: https://pmem.io/ndctl/daxctl-reconfigure-device.html --- Dan Williams (6): ACPI: NUMA: Up-level "map to online node" functionality mm/numa: Skip NUMA_NO_NODE and online nodes in numa_map_to_online_node() powerpc/papr_scm: Switch to numa_map_to_online_node() x86/mm: Introduce CONFIG_KEEP_NUMA x86/numa: Provide a range-to-target_node lookup facility libnvdimm/e820: Retrieve and populate correct 'target_node' info arch/powerpc/platforms/pseries/papr_scm.c | 21 -------- arch/x86/Kconfig | 1 arch/x86/mm/numa.c | 74 +++++++++++++++++++++++------ drivers/acpi/numa/srat.c | 41 ---------------- drivers/nvdimm/e820.c | 18 ++----- include/linux/acpi.h | 23 +++++++++ include/linux/numa.h | 23 +++++++++ mm/Kconfig | 5 ++ mm/mempolicy.c | 31 ++++++++++++ 9 files changed, 145 insertions(+), 92 deletions(-) _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org