public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: guzebing <guzebing1612@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	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: Wed, 7 Jan 2026 08:18:51 -0800	[thread overview]
Message-ID: <aV6HawIBiF-fQo31@infradead.org> (raw)
In-Reply-To: <dc92f814-043c-45b2-8d2a-403f462434d4@gmail.com>

On Mon, Jan 05, 2026 at 05:27:54PM +0800, guzebing wrote:
> Yes, I try to use a dedicated kmem cache to allocate cache for iomap-dio
> structure. However, when system memory is sufficient, kmalloc and kmem cache
> deliver identical performance.

Thanks for benchmarking this.

> > Also any chance you could factor this into common code?
> > 
> For a mempool, we first allocate with kmalloc or kmem cache and finally fall
> back to a reserved cache—this is for reliability. It’s not a great fit for
> our high‑performance scenario.
> 
> Additionally, the current need for frequent allocation/free (hundreds of
> thousands to millions of times per second) may be more suitable for the bio
> or dio structures; beyond those, I’m not sure whether similar scenarios
> exist.
> 
> If we were to extract a generic implementation solely for this, would it
> yield significant benefits? Do you have any good suggestions?


Factoring mean the percpu cache.  But given that it's been so long that
I looked at the code all the defails of this have been paged out from
my brain.  I can take another look when you resend it.

      reply	other threads:[~2026-01-07 16:18 UTC|newest]

Thread overview: 4+ 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
2026-01-05  9:27   ` guzebing
2026-01-07 16:18     ` 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=aV6HawIBiF-fQo31@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