All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Bart Van Assche <bvanassche@acm.org>,
	Li Zhijian <lizhijian@fujitsu.com>,
	zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org,
	linux-rdma@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, rpearsonhpe@gmail.com,
	matsuda-daisuke@fujitsu.com
Subject: Re: [PATCH RFC 1/2] RDMA/rxe: don't allow registering !PAGE_SIZE mr
Date: Sat, 28 Oct 2023 10:48:00 +0800	[thread overview]
Message-ID: <45c23e30-8405-470b-825c-e5166cd8a313@linux.dev> (raw)
In-Reply-To: <adad4ee6-ceef-4e45-a13d-048a1377e86f@acm.org>

在 2023/10/28 5:46, Bart Van Assche 写道:
> On 10/27/23 01:17, Zhu Yanjun wrote:
>> When ULP uses folio or compound page, ULP can not work well with RXE 
>> after this commit is applied.
> 
> Isn't it the responsibility of the DMA mapping code to build an sg-list
> for folios? Drivers like ib_srp see an sg-list, whether that comes from

A folio is a way of representing a set of physically contiguous base 
pages. In current implementations of folio, it seems that sg-list is not 
used.

In Folio, some huge pages whose size is not PAGE_SIZE is dma-mapped into 
hardware.

So the page size of folio is not equal to PAGE_SIZE. If this commit is 
applied, it causes potential risks to the future folio.

I have developed some folio work for some NIC and RDMA drivers. In 
Folio, the page size of Folio is possibly not equal to PAGE_SIZE, it is 
multiple PAGE_SIZE. And when folio is dma-mapped to HW, the page size is 
equal to multiple PAGE_SIZE.

In this case, ULP with folio will not work well with current RXE after 
this commit is applied.

Removing page_size in RXE seems a plan for this problem.

Zhu Yanjun


> a folio or from something else.
> 
> Bart.


  reply	other threads:[~2023-10-28  2:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27  5:41 [PATCH RFC 1/2] RDMA/rxe: don't allow registering !PAGE_SIZE mr Li Zhijian
2023-10-27  5:41 ` [PATCH RFC 2/2] RDMA/rxe: set RXE_PAGE_SIZE_CAP to PAGE_SIZE Li Zhijian
2023-10-27 21:47   ` Bart Van Assche
2023-10-28  3:52   ` Zhu Yanjun
2023-10-27  8:17 ` [PATCH RFC 1/2] RDMA/rxe: don't allow registering !PAGE_SIZE mr Zhu Yanjun
2023-10-27 21:46   ` Bart Van Assche
2023-10-28  2:48     ` Zhu Yanjun [this message]
2023-10-28 23:07       ` Bart Van Assche
2023-10-29  3:22         ` Zhu Yanjun
2023-10-30  8:13   ` Zhijian Li (Fujitsu)
2023-10-30  9:43     ` Zhu Yanjun
2023-10-30  7:51 ` Zhijian Li (Fujitsu)
2023-10-30 12:40   ` Jason Gunthorpe
2023-10-31  8:52     ` Zhu Yanjun
2023-10-31 13:19       ` Jason Gunthorpe
2023-11-01  0:58         ` Greg Sword
2023-10-31  9:59     ` Zhijian Li (Fujitsu)

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=45c23e30-8405-470b-825c-e5166cd8a313@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=bvanassche@acm.org \
    --cc=jgg@ziepe.ca \
    --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.