Skip to content

Commit

Permalink
io_uring: move 'poll_multi_queue' bool in io_ring_ctx
Browse files Browse the repository at this point in the history
The cacheline section holding this variable has two gaps, where one is
caused by this bool not packing well with structs. This causes it to
blow into the next cacheline. Move the variable, shrinking io_ring_ctx
by a full cacheline in size.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Jan 4, 2023
1 parent f26cc95 commit 59b745b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/io_uring_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ struct io_ring_ctx {
struct {
spinlock_t completion_lock;

bool poll_multi_queue;

/*
* ->iopoll_list is protected by the ctx->uring_lock for
* io_uring instances that don't use IORING_SETUP_SQPOLL.
Expand All @@ -300,7 +302,6 @@ struct io_ring_ctx {
*/
struct io_wq_work_list iopoll_list;
struct io_hash_table cancel_table;
bool poll_multi_queue;

struct llist_head work_llist;

Expand Down

0 comments on commit 59b745b

Please sign in to comment.