diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-02-11 10:48:03 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-11 10:48:03 -0700 |
commit | 3c1a2ead915c1bcb7b1f9e902469ea0ee1f7857f (patch) | |
tree | 2eb26e63595cc3a43603dfe85386a06f427c9bb0 /fs/io_uring.c | |
parent | e68a3ff8c342b655f01f74a577c15605eec9aa12 (diff) | |
download | linux-stable-3c1a2ead915c1bcb7b1f9e902469ea0ee1f7857f.tar.gz linux-stable-3c1a2ead915c1bcb7b1f9e902469ea0ee1f7857f.tar.bz2 linux-stable-3c1a2ead915c1bcb7b1f9e902469ea0ee1f7857f.zip |
io_uring: move submit side state closer in the ring
We recently added the submit side req cache, but it was placed at the
end of the struct. Move it near the other submission state for better
memory placement, and reshuffle a few other members at the same time.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index cd9c4c05f6f5..8be7a24aa10e 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -346,6 +346,13 @@ struct io_ring_ctx { struct io_uring_sqe *sq_sqes; } ____cacheline_aligned_in_smp; + struct { + struct mutex uring_lock; + wait_queue_head_t wait; + } ____cacheline_aligned_in_smp; + + struct io_submit_state submit_state; + struct io_rings *rings; /* IO offload */ @@ -414,11 +421,6 @@ struct io_ring_ctx { } ____cacheline_aligned_in_smp; struct { - struct mutex uring_lock; - wait_queue_head_t wait; - } ____cacheline_aligned_in_smp; - - struct { spinlock_t completion_lock; /* @@ -441,9 +443,10 @@ struct io_ring_ctx { struct list_head rsrc_ref_list; spinlock_t rsrc_ref_lock; - struct work_struct exit_work; struct io_restriction restrictions; - struct io_submit_state submit_state; + + /* Keep this last, we don't need it for the fast path */ + struct work_struct exit_work; }; /* |