From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Andrew Stellman <bugs@stellman-greene.com>,
Zhu Yanjun <zyjzyj2000@gmail.com>,
"yanjun.zhu@linux.dev" <yanjun.zhu@linux.dev>
Cc: Li Zhijian <lizhijian@fujitsu.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages
Date: Mon, 30 Nov 2026 20:53:55 -0800 [thread overview]
Message-ID: <e7ef0930-f64a-448f-a8d6-ef5ef12813ad@linux.dev> (raw)
In-Reply-To: <20261130221231.76622-1-bugs@stellman-greene.com>
在 2026/11/30 14:12, Andrew Stellman 写道:
> On Sun, Nov 29, 2026 at 08:57:43PM -0800, Zhu Yanjun wrote:
>> In rxe, mr_page_size() always returns PAGE_SIZE and never changes.
> I ran it to check, this time with no page-size hook. In one arm64 QEMU
> guest on mainline 7.4-rc5 with 64 KiB pages and KASAN, I connected the
> NVMe/RDMA host to an nvmet-rdma target over rxe. The only test change
> was a pr_info in rxe_map_mr_sg(), and during direct I/O it logged
> mr_page_size=4096 and PAGE_SIZE=65536.
>
> With a 512-byte-sector namespace and eight scattered iovecs, reading
> the data back failed at the first byte of the second iovec in each of
> three ten-round runs. With this patch applied, all ten rounds passed
> in each of three runs, and going back to the unpatched module brought
> the same failure back. Aligned 4 KiB I/O passed with both.
>
> So on this path the MR page size isn't PAGE_SIZE, and without this
> patch the data read back is wrong.
Interesting. Would you like to add logs to check if the returned value
of the function mr_page_size is changed?
Based on your commit, we just need to compare PAGE_SIZE with mr_page_size.
+ unsigned int chunk = min_t(unsigned int, PAGE_SIZE,
+ mr_page_size(mr)) - page_offset;
Thanks a lot.
Yanjun Zhu
>
>> If you intend to support different page_size values in rxe, patches
>> implementing that feature would be very welcome.
>>
>> From my perspective, however, the current patch does not yet actually
>> deliver that capability.
> The patch isn't trying to add support for another page size.
> rxe_map_mr_sg() already accepts the 4 KiB MR pages nvme-rdma asks for
> on this kernel, as the log above shows, and the patch fixes the copy
> for that case.
>
> I can send you the test program, setup scripts and logs off-list if
> you'd like to run it.
>
> Andrew
--
Best Regards,
Yanjun.Zhu
prev parent reply other threads:[~2026-12-01 4:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 14:08 [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages Andrew Stellman
2026-11-28 17:21 ` Zhu Yanjun
2026-11-29 0:19 ` Andrew Stellman
2026-11-29 0:36 ` Zhu Yanjun
2026-11-29 13:53 ` Andrew Stellman
2026-11-29 19:16 ` Zhu Yanjun
2026-11-30 4:10 ` Andrew Stellman
2026-11-30 4:57 ` Zhu Yanjun
2026-11-30 22:12 ` Andrew Stellman
2026-12-01 4:53 ` Zhu Yanjun [this message]
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=e7ef0930-f64a-448f-a8d6-ef5ef12813ad@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=bugs@stellman-greene.com \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox