From: Tianxianting <tian.xianting@h3c.com>
To: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
"mike.marciniszyn@intel.com" <mike.marciniszyn@intel.com>,
"dennis.dalessandro@intel.com" <dennis.dalessandro@intel.com>,
"dledford@redhat.com" <dledford@redhat.com>,
"jgg@ziepe.ca" <jgg@ziepe.ca>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] IB/hfi1: Avoid allocing memory on memoryless numa node
Date: Mon, 12 Oct 2020 13:24:56 +0000 [thread overview]
Message-ID: <3a00a3dced1c400bbe369348e441f7ef@h3c.com> (raw)
In-Reply-To: <9ba33073-044c-9da6-a90d-4626e6441793@cornelisnetworks.com>
Hi Dennis
Thanks for the comments
If it depends on x86_64, I think this issue doesn't exist.
Sorry to disturb you.
-----Original Message-----
From: Dennis Dalessandro [mailto:dennis.dalessandro@cornelisnetworks.com]
Sent: Monday, October 12, 2020 8:37 PM
To: tianxianting (RD) <tian.xianting@h3c.com>; mike.marciniszyn@intel.com; dennis.dalessandro@intel.com; dledford@redhat.com; jgg@ziepe.ca
Cc: linux-rdma@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/hfi1: Avoid allocing memory on memoryless numa node
On 10/10/2020 4:57 AM, Xianting Tian wrote:
> In architecture like powerpc, we can have cpus without any local
> memory attached to it. In such cases the node does not have real memory.
>
> Use local_memory_node(), which is guaranteed to have memory.
> local_memory_node is a noop in other architectures that does not
> support memoryless nodes.
>
> Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
> ---
> drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/hfi1/file_ops.c
> b/drivers/infiniband/hw/hfi1/file_ops.c
> index 8ca51e43c..79fa22cc7 100644
> --- a/drivers/infiniband/hw/hfi1/file_ops.c
> +++ b/drivers/infiniband/hw/hfi1/file_ops.c
> @@ -965,7 +965,7 @@ static int allocate_ctxt(struct hfi1_filedata *fd, struct hfi1_devdata *dd,
> */
> fd->rec_cpu_num = hfi1_get_proc_affinity(dd->node);
> if (fd->rec_cpu_num != -1)
> - numa = cpu_to_node(fd->rec_cpu_num);
> + numa = local_memory_node(cpu_to_node(fd->rec_cpu_num));
> else
> numa = numa_node_id();
> ret = hfi1_create_ctxtdata(dd->pport, numa, &uctxt);
>
The hfi1 driver depends on X86_64. I'm not sure what this patch buys, can you expand a bit?
-Denny
next prev parent reply other threads:[~2020-10-12 13:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 8:57 [PATCH] IB/hfi1: Avoid allocing memory on memoryless numa node Xianting Tian
2020-10-12 12:36 ` Dennis Dalessandro
2020-10-12 13:24 ` Tianxianting [this message]
2020-10-16 14:11 ` Jason Gunthorpe
2020-10-16 15:14 ` Dennis Dalessandro
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=3a00a3dced1c400bbe369348e441f7ef@h3c.com \
--to=tian.xianting@h3c.com \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.