public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>
Cc: Cheng Xu <chengyou@linux.alibaba.com>,
	"Li,Rongqing(ACG CCN)" <lirongqing@baidu.com>,
	Kai Shen <kaishen@linux.alibaba.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 答复: [外部邮件] Re: [PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables
Date: Fri, 27 Feb 2026 10:55:34 -0400	[thread overview]
Message-ID: <20260227145534.GL44359@ziepe.ca> (raw)
In-Reply-To: <20260226070954.GC12611@unreal>

On Thu, Feb 26, 2026 at 09:09:54AM +0200, Leon Romanovsky wrote:
> So why do we need this patch? The xxx_node() functions are useful when you
> need to force allocation on a specific NUMA node. In most cases, a plain
> kmalloc() will allocate memory on the same node as 'struct erdma_dev *dev',
> which typically matches the PCI device's NUMA node.

I think a naked kmalloc allocates memory on the numa node of the
thread that calls it, which is not the dev's node.

IMHO it is best practice to allocate DMA'able memory from the NUMA
node of the struct device.

Jason

  parent reply	other threads:[~2026-02-27 14:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25  8:51 [PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables lirongqing
2026-02-25 11:33 ` Cheng Xu
2026-02-25 11:46   ` 答复: [外部邮件] " Li,Rongqing(ACG CCN)
2026-02-25 12:07     ` Li,Rongqing(ACG CCN)
2026-02-26  1:50       ` Cheng Xu
2026-02-26  7:09         ` Leon Romanovsky
2026-02-26  7:59           ` Cheng Xu
2026-02-27 14:55           ` Jason Gunthorpe [this message]
2026-02-26  1:51 ` Cheng Xu

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=20260227145534.GL44359@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=chengyou@linux.alibaba.com \
    --cc=kaishen@linux.alibaba.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lirongqing@baidu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox