Skip to content

Commit e5598d6

Browse files
isilenceaxboe
authored andcommitted
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 <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9c8deddf9a7ed32069235a530d1e117fb460bc4c.1692916914.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 093a650 commit e5598d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/io_uring_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ struct io_uring_task {
6969
};
7070

7171
struct io_uring {
72-
u32 head ____cacheline_aligned_in_smp;
73-
u32 tail ____cacheline_aligned_in_smp;
72+
u32 head;
73+
u32 tail;
7474
};
7575

7676
/*

0 commit comments

Comments
 (0)