From patchwork Tue Jul 7 05:59:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 11647649 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C7EB13B6 for ; Tue, 7 Jul 2020 05:59:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5E5F420771 for ; Tue, 7 Jul 2020 05:59:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E5F420771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 65FA16B0005; Tue, 7 Jul 2020 01:59:34 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5E88C6B0008; Tue, 7 Jul 2020 01:59:34 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D7146B000A; Tue, 7 Jul 2020 01:59:34 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id 344A76B0005 for ; Tue, 7 Jul 2020 01:59:34 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AA8F72C81 for ; Tue, 7 Jul 2020 05:59:33 +0000 (UTC) X-FDA: 77010227826.30.cloth24_37024b526eb2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 811AC180B3C8B for ; Tue, 7 Jul 2020 05:59:33 +0000 (UTC) X-Spam-Summary: 50,0,0,1449e25d055b47e9,d41d8cd98f00b204,justin.he@arm.com,,RULES_HIT:41:355:379:541:967:968:973:988:989:1260:1261:1345:1437:1534:1540:1711:1730:1747:1777:1792:2194:2199:2393:2525:2560:2563:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3867:3871:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4470:5007:6261:6742:7875:8634:9025:10004:11026:11473:11658:11914:12043:12048:12296:12297:12438:12679:12895:13069:13311:13357:14096:14181:14384:14394:14721:21080:21451:21627:21788:30054,0,RBL:217.140.110.172:@arm.com:.lbl8.mailshell.net-62.2.0.100 64.100.201.201;04ygshmfh5tmh7xmm3ndnwrd3oenpopz4hh3e4or1gdbec8wi189xneffyenspd.knhn7zygas36yoq1eouoz8yzdump3nqui4eoiz9donbk8znu6hiqgbbxjpg7oxf.6-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: cloth24_37024b526eb2 X-Filterd-Recvd-Size: 2245 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jul 2020 05:59:32 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 04F4431B; Mon, 6 Jul 2020 22:59:32 -0700 (PDT) Received: from localhost.localdomain (entos-thunderx2-02.shanghai.arm.com [10.169.212.213]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 486023F68F; Mon, 6 Jul 2020 22:59:27 -0700 (PDT) From: Jia He To: Catalin Marinas , Will Deacon , Dan Williams , Vishal Verma , Dave Jiang Cc: Michal Hocko , Andrew Morton , Mike Rapoport , Baoquan He , Chuhong Yuan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, Kaly Xin , Jia He Subject: [PATCH v2 0/3] Fix and enable pmem as RAM device on arm64 Date: Tue, 7 Jul 2020 13:59:14 +0800 Message-Id: <20200707055917.143653-1-justin.he@arm.com> X-Mailer: git-send-email 2.17.1 X-Rspamd-Queue-Id: 811AC180B3C8B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: This fix a few issues when I tried to enable pmem as RAM device on arm64. Tested on ThunderX2 host/qemu "-M virt" guest with a nvdimm device. The memblocks from the dax pmem device can be either hot-added or hot-removed on arm64 guest. Changes: v2: - Drop unneccessary patch to harden try_offline_node - Use new solution(by David) to fix dev->target_node=-1 during probing - Refine the mem_hotplug_begin/done patch v1: https://lkml.org/lkml/2020/7/5/381 Jia He (3): arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL device-dax: use fallback nid when numa_node is invalid mm/memory_hotplug: fix unpaired mem_hotplug_begin/done arch/arm64/mm/numa.c | 5 +++-- drivers/dax/kmem.c | 22 ++++++++++++++-------- mm/memory_hotplug.c | 5 ++--- 3 files changed, 19 insertions(+), 13 deletions(-)