Re: [PATCHv4 5/5] io_uring: cache nodes and mapped buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/24/25 21:04, Keith Busch wrote:
On Thu, Feb 20, 2025 at 04:06:21PM +0000, Pavel Begunkov wrote:
On 2/20/25 15:24, Keith Busch wrote:
+		node = io_cache_alloc(&ctx->buf_table.node_cache, GFP_KERNEL);

That's why node allocators shouldn't be a part of the buffer table.

Are you saying you want file nodes to also subscribe to the cache? The

Yes, but it might be easier for you to focus on finalising the essential
parts, and then we can improve later.

two tables can be resized independently of each other, we don't know how
many elements the cache needs to hold.

I wouldn't try to correlate table sizes with desired cache sizes,
users can have quite different patterns like allocating a barely used
huge table. And you care about the speed of node change, which at
extremes is rather limited by CPU and performance and not spatiality
of the table. And you can also reallocate it as well.

Having the cache size and lifetime match a table that it's providing

You don't need to align it with the table size, I actually
overlooked it, will comment on v5.

seems as simple as I can make this. This is still an optimization at the
end of the day, so it's not strictly necessary to take the last two
patches from this series to make zero copy work if you don't want to
include it from the beginning.

Ok. As I mentioned above, I do think it's wrong for nodes, but
we can merge the patch and rework on top.

--
Pavel Begunkov





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux