Re: [PATCH for-next v8 4/6] RDMA/rxe: Allow registering MRs for On-Demand Paging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux