All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Cc: linux-rdma@vger.kernel.org, leon@kernel.org,
	zyjzyj2000@gmail.com, linux-kernel@vger.kernel.org,
	rpearsonhpe@gmail.com, lizhijian@fujitsu.com
Subject: Re: [PATCH for-next v8 4/6] RDMA/rxe: Allow registering MRs for On-Demand Paging
Date: Mon, 9 Dec 2024 15:33:58 -0400	[thread overview]
Message-ID: <20241209193358.GE2368570@nvidia.com> (raw)
In-Reply-To: <20241009015903.801987-5-matsuda-daisuke@fujitsu.com>

On Wed, Oct 09, 2024 at 10:59:01AM +0900, Daisuke Matsuda wrote:

> +static void rxe_mr_set_xarray(struct rxe_mr *mr, unsigned long start,
> +			      unsigned long end, unsigned long *pfn_list)
> +{
> +	unsigned long upper = rxe_mr_iova_to_index(mr, end - 1);
> +	unsigned long lower = rxe_mr_iova_to_index(mr, start);
> +	void *page, *entry;
> +
> +	XA_STATE(xas, &mr->page_list, lower);
> +
> +	xas_lock(&xas);
> +	while (xas.xa_index <= upper) {
> +		if (pfn_list[xas.xa_index] & HMM_PFN_WRITE) {
> +			page = xa_tag_pointer(hmm_pfn_to_page(pfn_list[xas.xa_index]),
> +					      RXE_ODP_WRITABLE_BIT);
> +		} else
> +			page = hmm_pfn_to_page(pfn_list[xas.xa_index]);

Like here:

> +	rxe_mr_set_xarray(mr, user_va, user_va + bcnt, umem_odp->pfn_list);

So this is just copying the pfn_list to the xarray? Why not just
directly use pfn_list instead?

Though, you'd have to lock it with the mutex, is that the issue?

Jason

  reply	other threads:[~2024-12-09 19:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  1:58 [PATCH for-next v8 0/6] On-Demand Paging on SoftRoCE Daisuke Matsuda
2024-10-09  1:58 ` [PATCH for-next v8 1/6] RDMA/rxe: Make MR functions accessible from other rxe source code Daisuke Matsuda
2024-10-09 14:13   ` Zhu Yanjun
2024-10-10  7:24     ` Daisuke Matsuda (Fujitsu)
2024-10-10  9:18       ` Zhu Yanjun
2024-10-10 10:29         ` Daisuke Matsuda (Fujitsu)
2024-12-09 19:19   ` Jason Gunthorpe
2024-10-09  1:58 ` [PATCH for-next v8 2/6] RDMA/rxe: Move resp_states definition to rxe_verbs.h Daisuke Matsuda
2024-12-09 19:20   ` Jason Gunthorpe
2024-10-09  1:59 ` [PATCH for-next v8 3/6] RDMA/rxe: Add page invalidation support Daisuke Matsuda
2024-10-13  6:15   ` Zhu Yanjun
2024-10-28  7:25     ` Daisuke Matsuda (Fujitsu)
2024-10-28 20:26       ` Zhu Yanjun
2024-12-09 19:21   ` Jason Gunthorpe
2024-12-10 12:00     ` Daisuke Matsuda (Fujitsu)
2024-12-09 19:31   ` Jason Gunthorpe
2024-12-10 12:12     ` Daisuke Matsuda (Fujitsu)
2024-10-09  1:59 ` [PATCH for-next v8 4/6] RDMA/rxe: Allow registering MRs for On-Demand Paging Daisuke Matsuda
2024-12-09 19:33   ` Jason Gunthorpe [this message]
2024-10-09  1:59 ` [PATCH for-next v8 5/6] RDMA/rxe: Add support for Send/Recv/Write/Read with ODP Daisuke Matsuda
2024-10-09  1:59 ` [PATCH for-next v8 6/6] RDMA/rxe: Add support for the traditional Atomic operations " Daisuke Matsuda
2024-10-17 19:27 ` [PATCH for-next v8 0/6] On-Demand Paging on SoftRoCE Jason Gunthorpe
2024-10-29  5:43   ` Daisuke Matsuda (Fujitsu)
2024-10-18  7:06 ` Zhu Yanjun
2024-10-28  7:59   ` Daisuke Matsuda (Fujitsu)
2024-10-28 20:19     ` Zhu Yanjun
2024-12-09 19:36 ` Jason Gunthorpe

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=20241209193358.GE2368570@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=matsuda-daisuke@fujitsu.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.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.