From: Pavel Begunkov Date: Thu, 24 Aug 2023 22:53:31 +0000 (+0100) Subject: io_uring: compact SQ/CQ heads/tails X-Git-Tag: v6.6.7~2069^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5598d6ae62626d261b046a2f19347c38681ff51;p=platform%2Fkernel%2Flinux-starfive.git io_uring: compact SQ/CQ heads/tails Queues heads and tails cache line aligned. That makes sq, cq taking 4 lines or 5 lines if we include the rest of struct io_rings (e.g. sq_flags is frequently accessed). Since modern io_uring is mostly single threaded, it doesn't make much send to spread them as such, it wastes space and puts additional pressure on caches. Put them all into a single line. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9c8deddf9a7ed32069235a530d1e117fb460bc4c.1692916914.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h index c0c03d8..608a8e8 100644 --- a/include/linux/io_uring_types.h +++ b/include/linux/io_uring_types.h @@ -69,8 +69,8 @@ struct io_uring_task { }; struct io_uring { - u32 head ____cacheline_aligned_in_smp; - u32 tail ____cacheline_aligned_in_smp; + u32 head; + u32 tail; }; /*