diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-06-14 23:37:20 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-15 15:38:39 -0600 |
commit | c7af47cf0fab5bad1fb8b250dfab8efc1f991559 (patch) | |
tree | ab4b1a0991aa2be4c0f221e7e71980e4d4b66f2f /fs/io_uring.c | |
parent | b1b2fc3574a6a94a1ab90271a7620345c39dc01f (diff) | |
download | lwn-c7af47cf0fab5bad1fb8b250dfab8efc1f991559.tar.gz lwn-c7af47cf0fab5bad1fb8b250dfab8efc1f991559.zip |
io_uring: keep SQ pointers in a single cacheline
sq_array and sq_sqes are always used together, however they are in
different cachelines, where the borderline is right before
cq_overflow_list is rather rarely touched. Move the fields together so
it loads only one cacheline.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3ef2411a94874da06492506a8897eff679244f49.1623709150.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 3692bbc7bd01..8c501eed3813 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -364,6 +364,7 @@ struct io_ring_ctx { * array. */ u32 *sq_array; + struct io_uring_sqe *sq_sqes; unsigned cached_sq_head; unsigned sq_entries; unsigned sq_thread_idle; @@ -373,8 +374,6 @@ struct io_ring_ctx { struct list_head defer_list; struct list_head timeout_list; struct list_head cq_overflow_list; - - struct io_uring_sqe *sq_sqes; } ____cacheline_aligned_in_smp; struct { |