Messages in this thread | | | Date | Fri, 31 Mar 2023 17:27:45 +0100 | Subject | Re: [PATCH 10/11] io_uring/rsrc: cache struct io_rsrc_node | From | Pavel Begunkov <> |
| |
On 3/31/23 15:09, Gabriel Krisman Bertazi wrote: > Pavel Begunkov <asml.silence@gmail.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
| |