From: Christoph Hellwig <hch@infradead.org>
To: guzebing <guzebing1612@gmail.com>
Cc: brauner@kernel.org, djwong@kernel.org, linux-xfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
guzebing <guzebing@bytedance.com>,
Fengnan Chang <changfengnan@bytedance.com>
Subject: Re: [PATCH] iomap: add allocation cache for iomap_dio
Date: Fri, 21 Nov 2025 02:22:13 -0800 [thread overview]
Message-ID: <aSA9VTO8vDPYZxNx@infradead.org> (raw)
In-Reply-To: <20251121090052.384823-1-guzebing1612@gmail.com>
On Fri, Nov 21, 2025 at 05:00:52PM +0800, guzebing wrote:
> From: guzebing <guzebing@bytedance.com>
>
> As implemented by the bio structure, we do the same thing on the
> iomap-dio structure. Add a per-cpu cache for iomap_dio allocations,
> enabling us to quickly recycle them instead of going through the slab
> allocator.
>
> By making such changes, we can reduce memory allocation on the direct
> IO path, so that direct IO will not block due to insufficient system
> memory. In addition, for direct IO, the read performance of io_uring
> is improved by about 2.6%.
Have you checked how much of that you'd get by using a dedicated
slab cache that should also do per-cpu allocations? Note that even
if we had a dedicated per-cpu cache we'd probably still want that.
Also any chance you could factor this into common code?
prev parent reply other threads:[~2025-11-21 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 9:00 [PATCH] iomap: add allocation cache for iomap_dio guzebing
2025-11-21 10:22 ` Christoph Hellwig [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=aSA9VTO8vDPYZxNx@infradead.org \
--to=hch@infradead.org \
--cc=brauner@kernel.org \
--cc=changfengnan@bytedance.com \
--cc=djwong@kernel.org \
--cc=guzebing1612@gmail.com \
--cc=guzebing@bytedance.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).