Re: [PATCH v3] iomap: add allocation cache for iomap_dio
From: changfengnan
Date: Tue Mar 17 2026 - 05:25:27 EST
> From: "Christoph Hellwig"<hch@xxxxxxxxxxxxx>
> Date: Tue, Mar 17, 2026, 17:13
> Subject: Re: [PATCH v3] iomap: add allocation cache for iomap_dio
> To: "changfengnan"<changfengnan@xxxxxxxxxxxxx>
> Cc: "Vlastimil Babka (SUSE)"<vbabka@xxxxxxxxxx>, "Dave Chinner"<david@xxxxxxxxxxxxx>, "Harry Yoo"<harry.yoo@xxxxxxxxxx>, "Hao Li"<hao.li@xxxxxxxxx>, "guzebing"<guzebing1612@xxxxxxxxx>, <brauner@xxxxxxxxxx>, <djwong@xxxxxxxxxx>, <hch@xxxxxxxxxxxxx>, <linux-xfs@xxxxxxxxxxxxxxx>, <linux-fsdevel@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <guzebing@xxxxxxxxxxxxx>, <syzbot@xxxxxxxxxxxxxxxxxxxxxxxxx>, <linux-mm@xxxxxxxxx>
> On Tue, Mar 17, 2026 at 04:33:24PM +0800, changfengnan wrote:
> > > IO is not my area but getting from 1.19M to 1.20M doesn't look like it's
> > > worth the custom code? (possibly from 1.17M to 1.20M it also wasn't).
> > Yes, at least for now, there’s no need for a per-CPU.
> > It might be better to replace kmalloc with a new cache, but my tests so far
> > haven’t shown any performance improvements. I’ll look into it further.
>
> Does using a kmem_cache help? That should generally be a nice win
> anyway due to keeping the objects together.
For now, my test case is just run ./t/io_uring and fio, no other process, not show
any performance improvements, test case is simple and no other user try to
kmalloc same size object, I think maybe there will be improvements in more
complex case. In theory, yes. I’ll run some tests to verify that.
>