Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7924680imu; Fri, 28 Dec 2018 07:23:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN4etyPCyIgET3A38DZMMXM3nWqIv9aKEOtMu81W2sWBe0gdWn7kBZnIPlSYTZeMYVicn99g X-Received: by 2002:a17:902:1745:: with SMTP id i63mr27326160pli.145.1546010585669; Fri, 28 Dec 2018 07:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546010585; cv=none; d=google.com; s=arc-20160816; b=pOTr9PqQoKwQiKq7KEH1iozOeglWwOxyu7XAO0BSnKjmUqrqwoIoJ/MO6y82oA4RRp pHui6ZCCLP/nNgFRx6smu63MHME+n1wvI8h7T+jxSosRrf3CShhteO77QeFr97BbaDHE xG4DEc7n77AQ8Xny0qA2JzaGj69d18pzZyis259rSrzIs9NuBcU8m1h3dfwHYGMNU7iy bUoyTGv7j04hTBqD41ClaBo8j/1hMgB3PCa3kzqrLPPJqHyIw5G3JWwn8uSzJLydDh0m 8nhYgDR+GLLGVT4YEJliwx40i4sYE1SYMojwQxkKr3JoiAcBCztyxXCsTVEaEaGxanLg l3KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=uHr1bagXlgLga8vTvfjc9ZPGj87ddFRhAZKD3EFOmPg=; b=GQ2lVnd3RJw8PejJB1XWs02gaQ8Y+GBm6v1DZCCBrWdnVNALypGvMQaQvNplCgirWW Xhk15AQvYLs0Dv70p5EDxtB9e1v3YM+zOL9Ip9qGZpuihySgv6/BAKcpt+OOCs2S7+06 dePof3JjK0bRp8G6qo4ebMNmCoV/e7ecTlxNVJkFgItgm0aKMF0mVQZfWQE80Qf4LaJr hgz45L+d5OLORteWxlfB8TsmA4+AXVohjll9W2rpyZGs+3TNx81nXWrzwS7LGpWNlpyN zAx5Zs6LasJ+lonUugMWF4LA4m+4Ys9x5VA+G4hzmVGiiu7vgZfdM/A7+VCNmVYmwcqB lihg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j10si19726475plg.123.2018.12.28.07.22.49; Fri, 28 Dec 2018 07:23:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1731241AbeL1D1u (ORCPT + 99 others); Thu, 27 Dec 2018 22:27:50 -0500 Received: from mga12.intel.com ([192.55.52.136]:48324 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731205AbeL1D1t (ORCPT ); Thu, 27 Dec 2018 22:27:49 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2018 19:27:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,407,1539673200"; d="scan'208";a="121697285" Received: from wangdan1-mobl1.ccr.corp.intel.com (HELO wfg-t570.sh.intel.com) ([10.254.210.154]) by FMSMGA003.fm.intel.com with ESMTP; 27 Dec 2018 19:27:45 -0800 Received: from wfg by wfg-t570.sh.intel.com with local (Exim 4.89) (envelope-from ) id 1gcioK-0004r0-HH; Fri, 28 Dec 2018 11:27:44 +0800 Date: Fri, 28 Dec 2018 11:27:44 +0800 From: Fengguang Wu To: Yang Shi Cc: Dan Williams , Matthew Wilcox , Andrew Morton , Linux Memory Management List , Fan Du , KVM list , LKML , Yao Yuan , Peng Dong , Huang Ying , Liu Jingqi , Dong Eddie , Dave Hansen , Zhang Yi Subject: Re: [RFC][PATCH v2 01/21] e820: cheat PMEM as DRAM Message-ID: <20181228032744.i6d7g7ykdi7hjrai@wfg-t540p.sh.intel.com> References: <20181226131446.330864849@intel.com> <20181226133351.106676005@intel.com> <20181227034141.GD20878@bombadil.infradead.org> <20181227041132.xxdnwtdajtm7ny4q@wfg-t540p.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 27, 2018 at 11:32:06AM -0800, Yang Shi wrote: >On Wed, Dec 26, 2018 at 9:13 PM Dan Williams wrote: >> >> On Wed, Dec 26, 2018 at 8:11 PM Fengguang Wu wrote: >> > >> > On Wed, Dec 26, 2018 at 07:41:41PM -0800, Matthew Wilcox wrote: >> > >On Wed, Dec 26, 2018 at 09:14:47PM +0800, Fengguang Wu wrote: >> > >> From: Fan Du >> > >> >> > >> This is a hack to enumerate PMEM as NUMA nodes. >> > >> It's necessary for current BIOS that don't yet fill ACPI HMAT table. >> > >> >> > >> WARNING: take care to backup. It is mutual exclusive with libnvdimm >> > >> subsystem and can destroy ndctl managed namespaces. >> > > >> > >Why depend on firmware to present this "correctly"? It seems to me like >> > >less effort all around to have ndctl label some namespaces as being for >> > >this kind of use. >> > >> > Dave Hansen may be more suitable to answer your question. He posted >> > patches to make PMEM NUMA node coexist with libnvdimm and ndctl: >> > >> > [PATCH 0/9] Allow persistent memory to be used like normal RAM >> > https://lkml.org/lkml/2018/10/23/9 >> > >> > That depends on future BIOS. So we did this quick hack to test out >> > PMEM NUMA node for the existing BIOS. >> >> No, it does not depend on a future BIOS. > >It is correct. We already have Dave's patches + Dan's patch (added >target_node field) work on our machine which has SRAT. Thanks for the correction. It looks my perception was out of date. So we can follow Dave+Dan's patches to create the PMEM NUMA nodes. Thanks, Fengguang >> >> Willy, have a look here [1], here [2], and here [3] for the >> work-in-progress ndctl takeover approach (actually 'daxctl' in this >> case). >> >> [1]: https://lkml.org/lkml/2018/10/23/9 >> [2]: https://lkml.org/lkml/2018/10/31/243 >> [3]: https://lists.01.org/pipermail/linux-nvdimm/2018-November/018677.html >> >