From: Brian Martin <brayniac@gmail.com>
To: Louis Thiery <thiery.louis@gmail.com>, Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org, Pavel Begunkov <asml.silence@gmail.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] io_uring/net: don't charge the folio offset to truesize for managed frags
Date: Thu, 19 Nov 2026 16:11:14 -0800 [thread overview]
Message-ID: <20261120001114.61077-1-brayniac@gmail.com> (raw)
In-Reply-To: <20261119232935.1708458-1-thiery.louis@gmail.com>
On Thu, 19 Nov 2026 23:29:35 +0000, Louis Thiery wrote:
> Only the in-page part of the offset matters for how much memory a
> fragment ties up, so use offset_in_page().
This is the change suggested in my report earlier today:
https://lore.kernel.org/io-uring/CAC+fX10wVVSqGnfCg+aazorsCxB34sUDV-XJiBPd6R3Kuqc-7Q@mail.gmail.com/
I applied this patch to io_uring-7.4 (0659e44ce739) and ran the
reproducer from that report. With it, SEND_ZC from a registered huge-page
buffer is charged the same as SEND_ZC without one on every row, for
hugetlb and THP, including 8192 for a send that crosses a page boundary.
On the stock kernel the same run shows the overcharge.
Jens, if you apply this, could you add:
Reported-by: Brian Martin <brayniac@gmail.com>
Closes: https://lore.kernel.org/io-uring/CAC+fX10wVVSqGnfCg+aazorsCxB34sUDV-XJiBPd6R3Kuqc-7Q@mail.gmail.com/
Tested-by: Brian Martin <brayniac@gmail.com>
next prev parent reply other threads:[~2026-11-20 0:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 23:29 Louis Thiery
2026-11-20 0:11 ` Brian Martin [this message]
2026-11-20 0:26 ` Louis Thiery
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=20261120001114.61077-1-brayniac@gmail.com \
--to=brayniac@gmail.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=thiery.louis@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
all inboxes | Powered by JetHome®