From: sashiko-bot@kernel.org
To: "Qiliang Yuan" <qiliang.yuan@linux.dev>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-rc] RDMA/rxe: Allocate the MR page array with kvzalloc()
Date: Mon, 23 Nov 2026 09:33:15 +0000 [thread overview]
Message-ID: <sashiko-outbox-228980@kernel.org> (raw)
In-Reply-To: <20261123-bug-rdma-rxe-large-mr-v1-1-8d0748ac4a3f@linux.dev>
> A user MR keeps a struct rxe_mr_page, 16 bytes on 64-bit, for every
> PAGE_SIZE page it covers, in one array allocated with kzalloc() when the
> MR is registered. Before the array, the pages were kept in an xarray.
>
> With 4 KiB pages, the array of an MR larger than 1 GiB exceeds
> KMALLOC_MAX_SIZE, so registering it fails with -ENOMEM, and the first
> attempt warns:
>
> WARNING: mm/slub.c:5459 at ___kmalloc_large_node+0xe9/0x130
> Call Trace:
> __kmalloc_large_node_noprof
> __kmalloc_noprof
> __alloc_mr_page_info
> rxe_mr_init_user
> rxe_reg_user_mr
>
> Allocate the array with kvzalloc_objs() and free it with kvfree(), so
> that MRs of any size can be registered again.
>
> Registering an MR over THP-backed memory, median of 3:
>
> size before (ms) after (ms) change
> 1 GiB 5.3 5.2 -2%
> 2 GiB -ENOMEM 10.8 n/a
> 4 GiB -ENOMEM 21.1 n/a
> 16 GiB -ENOMEM 85.9 n/a
>
> Fixes: 12985e5915a0b ("RDMA/rxe: Fix iova-to-va conversion for MR page sizes != PAGE_SIZE")
> Cc: stable@vger.kernel.org
> Signed-off-by: Qiliang Yuan <qiliang.yuan@linux.dev>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-bug-rdma-rxe-large-mr-v1-1-8d0748ac4a3f@linux.dev?part=1
prev parent reply other threads:[~2026-11-23 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 9:26 [PATCH for-rc] RDMA/rxe: Allocate the MR page array with kvzalloc() Qiliang Yuan
2026-11-23 9:33 ` sashiko-bot [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=sashiko-outbox-228980@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=qiliang.yuan@linux.dev \
--cc=sashiko-reviews@lists.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