Skip to content

Commit 59b745b

Browse files
committed
io_uring: move 'poll_multi_queue' bool in io_ring_ctx
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 <[email protected]>
1 parent f26cc95 commit 59b745b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/io_uring_types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ struct io_ring_ctx {
292292
struct {
293293
spinlock_t completion_lock;
294294

295+
bool poll_multi_queue;
296+
295297
/*
296298
* ->iopoll_list is protected by the ctx->uring_lock for
297299
* io_uring instances that don't use IORING_SETUP_SQPOLL.
@@ -300,7 +302,6 @@ struct io_ring_ctx {
300302
*/
301303
struct io_wq_work_list iopoll_list;
302304
struct io_hash_table cancel_table;
303-
bool poll_multi_queue;
304305

305306
struct llist_head work_llist;
306307

0 commit comments

Comments
 (0)