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=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 E5625C17440 for ; Tue, 12 Nov 2019 19:38:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8997A20818 for ; Tue, 12 Nov 2019 19:38:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="HcnG05wn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8997A20818 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CF8C06B0003; Tue, 12 Nov 2019 14:38:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CAA1D6B0005; Tue, 12 Nov 2019 14:38:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B98666B0006; Tue, 12 Nov 2019 14:38:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 9F8416B0003 for ; Tue, 12 Nov 2019 14:38:04 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 56EB74435 for ; Tue, 12 Nov 2019 19:38:04 +0000 (UTC) X-FDA: 76148636088.20.band92_466b8ba8da85f X-HE-Tag: band92_466b8ba8da85f X-Filterd-Recvd-Size: 5574 Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Nov 2019 19:38:03 +0000 (UTC) Received: by mail-oi1-f196.google.com with SMTP id j7so15951490oib.3 for ; Tue, 12 Nov 2019 11:38:03 -0800 (PST) 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=WimPYMY4ElLHUFFKax8XxzUf794g+9qy+ZcVmaVuAcA=; b=HcnG05wnGXWAD3tJYg/lrbE1+BP8mZbcyUXiEhT/4H5cmFBXdm3LKznNrl7E06/RvD nrMvD1V15i3JWo6K7vp/VRjIrRS2nSyFSCYI8nPTTeGkVucNiA6+ctSfIUzcIIvV6fb6 sDT8iHpdk7lXBXkPvyp7/GCIWbwBhDpNpfKVOvgcyOGje8Q4Yd0VyT7rd8EfPfmXIBp3 ULNNC9ad1rTHxaWTGUMdDaaqTftk8ZZxHfUFcU2bpQpTuDHusLrARE7GHzz5nhrUAKYH C9yvDnR9ztR92XmKIaUbf3aKBrmVWX0DszAGA3L+zGW44LVsKSfSImwMdxaj4baUPBHh uYWg== 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=WimPYMY4ElLHUFFKax8XxzUf794g+9qy+ZcVmaVuAcA=; b=IG2bMLINU52fC1V4V0kMh6/aYRCoRbeklFbZk9yphnnbfoOPyMm3oWd02in2v9WZsx zOsKjmaSOBtSkU0DLV8d+N4DIuI5aKu+xiEXBktwCFETo9iEUW6/gUsjCMFebEmS1Thd 4xI2vAJYfZefpmWSg8FkImuXIg98QmypQ8b1mzi4p9VSYLHqG5f2AZtzbAEn4AQFmCKx 2Yr01VIkpjkYfm5COPyXDmk8uu7HMgmjP7qyycvMxpr7+2eswxTUeKkLbShopuL6uxR6 VEmPIbQRkOr24x1ZmpUDL8Z3lGNHISCUo/mtNGyPm+xidqOGzluuv27S2F/1h+AW335M o58w== X-Gm-Message-State: APjAAAUvZ0uHVgAJ/v5rsPz/+hgVbFC0Nlje6KF35ctz9hvBqzk04mLd 47N+XGgYUpN3lfLNaHNcM228qRu3mg6bgJ+PR1ESDw== X-Google-Smtp-Source: APXvYqy4nVx5cqhvzWgLCkvoCxBoiErI2cm44tEsrTAKJ9s0rE6buD5AjAFCNien8s0flORShIZ0P4Y/eJ81VIPpwYo= X-Received: by 2002:aca:ad52:: with SMTP id w79mr550653oie.149.1573587482869; Tue, 12 Nov 2019 11:38:02 -0800 (PST) MIME-Version: 1.0 References: <157309899529.1582359.15358067933360719580.stgit@dwillia2-desk3.amr.corp.intel.com> <8736ettj60.fsf@linux.ibm.com> In-Reply-To: <8736ettj60.fsf@linux.ibm.com> From: Dan Williams Date: Tue, 12 Nov 2019 11:37:51 -0800 Message-ID: Subject: Re: [PATCH 00/16] Memory Hierarchy: Enable target node lookups for reserved memory To: "Aneesh Kumar K.V" Cc: linux-nvdimm , David Hildenbrand , Peter Zijlstra , Borislav Petkov , Michael Ellerman , "H. Peter Anvin" , X86 ML , Thomas Gleixner , Dave Hansen , Andrew Morton , Ingo Molnar , Michal Hocko , "Rafael J. Wysocki" , Andy Lutomirski , Linux Kernel Mailing List , Linux MM Content-Type: text/plain; charset="UTF-8" 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 Tue, Nov 12, 2019 at 3:43 AM Aneesh Kumar K.V wrote: > > Dan Williams writes: > > > Yes, this patch series looks like a pile of boring libnvdimm cleanups, > > but buried at the end are some small gems that testing with libnvdimm > > uncovered. These gems will prove more valuable over time for Memory > > 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 [1]. > > > > 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. > > > > The first 12 patches are cleanups to make sure that all nvdimm devices > > and their children properly export a numa_node attribute. The switch to > > a device-type is less code and less error prone as a result. > > > Will this still allow leaf driver to have platform specific attribute > exposed via sysfs? Or do we want to still keep them in nvdimm core and > control the visibility via is_visible() callback? The leaf driver can still have platform specific attributes, see: acpi_nfit_attribute_groups acpi_nfit_dimm_attribute_groups acpi_nfit_region_attribute_groups ...that still exist after this conversion. This conversion simply arranges for those to passed in without making the leaf driver also be responsible for specifying the core attributes.