From: Dan Williams <dan.j.williams@intel.com>
To: tj@kernel.org
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
linux-nvdimm@ml01.01.org, hch@lst.de,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] devm_memremap_pages: use numa_mem_id
Date: Fri, 25 Sep 2015 21:17:47 -0400 [thread overview]
Message-ID: <20150926011747.2848.12543.stgit@dwillia2-desk3.jf.intel.com> (raw)
In-Reply-To: <20150926011243.2848.82422.stgit@dwillia2-desk3.jf.intel.com>
Hint to closest numa node for the placement of newly allocated pages.
As that is where the device's other allocations will originate by
default when it does not specify a NUMA node.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
kernel/memremap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/memremap.c b/kernel/memremap.c
index 72b0c66628b6..86a5cdeb18f2 100644
--- a/kernel/memremap.c
+++ b/kernel/memremap.c
@@ -175,7 +175,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res)
nid = dev_to_node(dev);
if (nid < 0)
- nid = 0;
+ nid = numa_mem_id();
error = arch_add_memory(nid, res->start, resource_size(res), true);
if (error) {
next prev parent reply other threads:[~2015-09-26 1:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-26 1:17 [PATCH 0/3] numa allocations for devm and pmem Dan Williams
2015-09-26 1:17 ` [PATCH 1/3] devm: make allocations numa aware by default Dan Williams
2015-09-30 0:30 ` Dan Williams
2015-09-30 21:40 ` Tejun Heo
2015-09-26 1:17 ` Dan Williams [this message]
2015-09-26 1:17 ` [PATCH 3/3] pmem, memremap: convert to numa aware allocations Dan Williams
2015-10-04 6:40 ` [PATCH 0/3] numa allocations for devm and pmem Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150926011747.2848.12543.stgit@dwillia2-desk3.jf.intel.com \
--to=dan.j.williams@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=ross.zwisler@linux.intel.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®