lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Oct 2020 13:24:56 +0000
From:   Tianxianting <tian.xianting@....com>
To:     Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>,
        "mike.marciniszyn@...el.com" <mike.marciniszyn@...el.com>,
        "dennis.dalessandro@...el.com" <dennis.dalessandro@...el.com>,
        "dledford@...hat.com" <dledford@...hat.com>,
        "jgg@...pe.ca" <jgg@...pe.ca>
CC:     "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] IB/hfi1: Avoid allocing memory on memoryless numa node

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@...nelisnetworks.com] 
Sent: Monday, October 12, 2020 8:37 PM
To: tianxianting (RD) <tian.xianting@....com>; mike.marciniszyn@...el.com; dennis.dalessandro@...el.com; dledford@...hat.com; jgg@...pe.ca
Cc: linux-rdma@...r.kernel.org; linux-kernel@...r.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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ