From: Jens Axboe <axboe@kernel.dk>
To: dejamarina@proton.me
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring: keep memlock accounting while regions are mapped
Date: Tue, 25 Aug 2026 11:52:54 -0600 [thread overview]
Message-ID: <29d8d38f-cf2c-4216-96fd-546254c48332@kernel.dk> (raw)
In-Reply-To: <20260816-io-uring-retained-mmap-accounting-v1-1-44e5eedd7ad3@proton.me>
On 8/16/26 1:07 AM, Marina via B4 Relay wrote:
> From: Marina <dejamarina@proton.me>
>
> io_uring unaccounts kernel-allocated SQ/CQ and SQE regions when resize
> replaces them, even if existing VMAs still retain their pages. Repeating
> mmap and resize can therefore retain memory beyond RLIMIT_MEMLOCK.
>
> Move each charge to a refcounted record owned by the active region and its
> MMU or NOMMU mappings. Release it after both the region and final VMA are
> gone. Keep direct accounting for user-provided regions, which cannot be
> mapped through the io_uring file.
>
> Accounting stays region-granular, so a partial mapping retains the complete
> region charge.
Patch doesn't apply to the current tree at all. Please send an updated
one, if needed.
--
Jens Axboe
prev parent reply other threads:[~2026-08-25 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 7:07 [PATCH] io_uring: keep memlock accounting while regions are mapped Marina via B4 Relay
2026-08-16 7:07 ` Marina
2026-08-25 17:52 ` Jens Axboe [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=29d8d38f-cf2c-4216-96fd-546254c48332@kernel.dk \
--to=axboe@kernel.dk \
--cc=dejamarina@proton.me \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.