Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Bernard Metzler <bmt@zurich.ibm.com>, linux-rdma@vger.kernel.org
Cc: jgg@ziepe.ca, leon@kernel.org, max7255@meta.com,
	dennis.dalessandro@cornelisnetworks.com, benve@cisco.com,
	vadim.fedorenko@linux.dev
Subject: Re: [PATCH for-next v2] RDMA/siw: Use ib_umem_get() to pin user pages
Date: Fri, 10 Nov 2023 14:37:09 +0800	[thread overview]
Message-ID: <e606de53-b22f-f347-a71e-7b8a3cfb915a@linux.dev> (raw)
In-Reply-To: <20231104075643.195186-1-bmt@zurich.ibm.com>

Hi,

On 11/4/23 15:56, Bernard Metzler wrote:
> Abandon siw private code to pin user pages during user
> memory registration, but use ib_umem_get() instead.
> This will help maintaining the driver in case of changes
> to the memory subsystem.
>
> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
> ---
> v1 -> v2: remove RLIMIT memlock check logic, now done in ib_umem_get()
> ---

Looks good, Acked-by: Guoqing Jiang <guoqing.jiang@linux.dev>

...

> +	for (i = 0; num_pages > 0; i++) {
>   		int nents = min_t(int, num_pages, PAGES_PER_CHUNK);
>   		struct page **plist =
>   			kcalloc(nents, sizeof(struct page *), GFP_KERNEL);
>   
>   		if (!plist) {
>   			rv = -ENOMEM;
> -			goto out_sem_up;
> +			goto err_out;
>   		}
>   		umem->page_chunk[i].plist = plist;

One off topic question, why two dimensional list is needed for siw umem?
Thanks in advance.

Guoqing

  reply	other threads:[~2023-11-10 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-04  7:56 [PATCH for-next v2] RDMA/siw: Use ib_umem_get() to pin user pages Bernard Metzler
2023-11-10  6:37 ` Guoqing Jiang [this message]
2023-11-10 15:09   ` Bernard Metzler
2023-11-13  8:16 ` Leon Romanovsky

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=e606de53-b22f-f347-a71e-7b8a3cfb915a@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=benve@cisco.com \
    --cc=bmt@zurich.ibm.com \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=max7255@meta.com \
    --cc=vadim.fedorenko@linux.dev \
    /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