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,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 683C3C43331 for ; Tue, 12 Nov 2019 11:43:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3375E21783 for ; Tue, 12 Nov 2019 11:43:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3375E21783 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B76696B0003; Tue, 12 Nov 2019 06:43:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AFEE66B0007; Tue, 12 Nov 2019 06:43:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C8A56B0008; Tue, 12 Nov 2019 06:43:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id 8344A6B0003 for ; Tue, 12 Nov 2019 06:43:24 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 1ED6A8249980 for ; Tue, 12 Nov 2019 11:43:24 +0000 (UTC) X-FDA: 76147439928.01.tray05_897258cb213 X-HE-Tag: tray05_897258cb213 X-Filterd-Recvd-Size: 5725 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Nov 2019 11:43:23 +0000 (UTC) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xACBeDxO066762; Tue, 12 Nov 2019 06:43:02 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w7t0xn5k1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Nov 2019 06:43:02 -0500 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id xACBedXo070403; Tue, 12 Nov 2019 06:43:02 -0500 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w7t0xn5hf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Nov 2019 06:43:02 -0500 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xACBfCGg005201; Tue, 12 Nov 2019 11:42:59 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma02wdc.us.ibm.com with ESMTP id 2w5n35x6wa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Nov 2019 11:42:59 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xACBgwSZ52166954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Nov 2019 11:42:58 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE70EAC05B; Tue, 12 Nov 2019 11:42:58 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C5FFEAC059; Tue, 12 Nov 2019 11:42:50 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.199.45.124]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 12 Nov 2019 11:42:50 +0000 (GMT) X-Mailer: emacs 26.2 (via feedmail 11-beta-1 I) From: "Aneesh Kumar K.V" To: Dan Williams , linux-nvdimm@lists.01.org Cc: David Hildenbrand , Peter Zijlstra , Borislav Petkov , Michael Ellerman , "H. Peter Anvin" , x86@kernel.org, Thomas Gleixner , Dave Hansen , Andrew Morton , Ingo Molnar , Michal Hocko , "Rafael J. Wysocki" , Andy Lutomirski , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 00/16] Memory Hierarchy: Enable target node lookups for reserved memory In-Reply-To: <157309899529.1582359.15358067933360719580.stgit@dwillia2-desk3.amr.corp.intel.com> References: <157309899529.1582359.15358067933360719580.stgit@dwillia2-desk3.amr.corp.intel.com> Date: Tue, 12 Nov 2019 17:12:47 +0530 Message-ID: <8736ettj60.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-12_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911120106 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: 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? -aneesh