From: Ali Ahmet Memis <ali@iusegentoo.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Pavel Begunkov <asml.silence@gmail.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: io_uring/memmap: compound allocation larger than accounted region
Date: Thu, 6 Aug 2026 15:42:00 +0000 [thread overview]
Message-ID: <20260806154200.183725-1-ali@iusegentoo.com> (raw)
io_mem_alloc_compound() allocates get_order(size) pages, while
io_create_region() accounts reg->size >> PAGE_SHIFT. For a ring with 4096 SQ
entries and the default CQ size that is 64 pages allocated against 37
accounted.
Is that intentional? memcg charges the full allocation, so only RLIMIT_MEMLOCK
undercounts, and the gap is bounded by 2x. I did not want to send a patch for
something that may well be a deliberate trade for the single folio.
Thanks,
Ali
next reply other threads:[~2026-08-06 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 15:42 Ali Ahmet Memis [this message]
2026-08-06 16:21 ` io_uring/memmap: compound allocation larger than accounted region Gabriel Krisman Bertazi
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=20260806154200.183725-1-ali@iusegentoo.com \
--to=ali@iusegentoo.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox