[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6eaadad2-d6a6-dfbb-88aa-8ae68af2f89d@gmail.com>
Date: Fri, 31 Mar 2023 17:27:45 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Gabriel Krisman Bertazi <krisman@...e.de>
Cc: io-uring@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/11] io_uring/rsrc: cache struct io_rsrc_node
On 3/31/23 15:09, Gabriel Krisman Bertazi wrote:
> Pavel Begunkov <asml.silence@...il.com> writes:
>
>> Add allocation cache for struct io_rsrc_node, it's always allocated and
>> put under ->uring_lock, so it doesn't need any extra synchronisation
>> around caches.
>
> Hi Pavel,
>
> I'm curious if you considered using kmem_cache instead of the custom
> cache for this case? I'm wondering if this provokes visible difference in
> performance in your benchmark.
I didn't try it, but kmem_cache vs kmalloc, IIRC, doesn't bring us
much, definitely doesn't spare from locking, and the overhead
definitely wasn't satisfactory for requests before.
A quick note that I want to further limit the cache size,
IO_ALLOC_CACHE_MAX=512 for nodes doesn't sound great.
--
Pavel Begunkov
Powered by blists - more mailing lists