From patchwork Thu Nov 12 13:10:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 7601961 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF82F9F392 for ; Thu, 12 Nov 2015 13:11:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2AE2201D3 for ; Thu, 12 Nov 2015 13:11:01 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0055201C8 for ; Thu, 12 Nov 2015 13:11:00 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 816981A20C7; Thu, 12 Nov 2015 05:11:00 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C6F001A20C7 for ; Thu, 12 Nov 2015 05:10:58 -0800 (PST) Received: by wmww144 with SMTP id w144so199768714wmw.1 for ; Thu, 12 Nov 2015 05:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plexistor_com.20150623.gappssmtp.com; s=20150623; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=3nCZ5+07gBmjSzCg92Otw/dNbD/dwfqV+kXFTDikQfo=; b=d92rRcVHArBkxVvVjnusn20XtU9AEB96DUYQofKpTeR+p7MWQCepBC+c4GQweyGJaT t50N78kUg3DIJ+Te5x+c1Q/8uvRiZC9QdNGBcfC+cawhCExLSjqf2X2OuL2saOHhlv8/ YTAeUSz3KyjXWBWdbV5LPmEL8LsSYTT0G/O9V+Tq9RQMCwgrSRXDxYNTKQjjCAuv/ZWW 2/RfM7XRwIRF1OXnUfxY6w1QD+NAwwFjsG3SOsHWjun1DwG+U+mRP8P/QxG/XEQV4686 nr8Tx/eyL7M/XKdszkbuQEIxE98B8YBYeZ1j9YTDxnbdQo+WHsEJ+nuiZrtoYViK3l7Z MKsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=3nCZ5+07gBmjSzCg92Otw/dNbD/dwfqV+kXFTDikQfo=; b=ag604S9hr+IMIfEkYckLPjIsYYbzWNQxEIb4QdEYIwj9VYK0RFPj3KcBRX6ztKoPKv 8BdTgJmsgpMtU9nnL5oEO7MEthw4HXQhIR56aISjMpWTR3O2j3Bw+8IGnFm+VYLUQOIC PcIqUbiujLShgcaGgV2ZObg/VOxMyx8RSUg2oQ3iZL7l0McbZCZiBQKU/1LHLunhbsZs cOsA53EZzacV1GuwoOZNeu11sUN1CNgQnfgxmh9HG5h6Jvs6NV+Kh41dmCBIMxoirG/I oPxTGuG9YSwWHkw2ytRzBIwPLq61toSfYKoWo8eMAxJLxdKkLQuh6TKAX0/MktjIJ/jH 2C3Q== X-Gm-Message-State: ALoCoQkFDLW7tFshF7sz4HoRugbArckgnnFCDddqUPhH1YUEGpuyiBPGyRmZ6VDXpOou6SrrQSQ9 X-Received: by 10.28.47.212 with SMTP id v203mr1750925wmv.37.1447333856409; Thu, 12 Nov 2015 05:10:56 -0800 (PST) Received: from [10.0.0.5] ([207.232.55.62]) by smtp.googlemail.com with ESMTPSA id t126sm30666900wmd.18.2015.11.12.05.10.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 05:10:55 -0800 (PST) Message-ID: <56448FDE.4020404@plexistor.com> Date: Thu, 12 Nov 2015 15:10:54 +0200 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Dan Williams Subject: [PATCH] nvdimm: proper NID in e820_pmem_probe References: <5643B043.3010103@plexistor.com> <5643BB8D.4080202@plexistor.com> In-Reply-To: <5643BB8D.4080202@plexistor.com> Cc: linux-fsdevel , Stable Tree , "linux-nvdimm@lists.01.org" X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dan Williams [Boaz] What I see is that in the call to arch_add_memory() nid==0 regardless of the real NID the memory is actually on. [Dan] In the case of NFIT numa node should already be set, and in the case of the memmap=ss!nn or e820-type-12 we can set the numa node like this: [Needed for v4.3] CC: Stable Tree Tested-by: Boaz Harrosh Signed-off-by: Boaz Harrosh --- drivers/nvdimm/e820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c index 8282db2..e40df8f 100644 --- a/drivers/nvdimm/e820.c +++ b/drivers/nvdimm/e820.c @@ -48,7 +48,7 @@ static int e820_pmem_probe(struct platform_device *pdev) memset(&ndr_desc, 0, sizeof(ndr_desc)); ndr_desc.res = p; ndr_desc.attr_groups = e820_pmem_region_attribute_groups; - ndr_desc.numa_node = NUMA_NO_NODE; + ndr_desc.numa_node = memory_add_physaddr_to_nid(p->start); set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags); if (!nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc)) goto err;