public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: move 'poll_multi_queue' bool in io_ring_ctx
@ 2023-01-04 20:52 Jens Axboe
  0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2023-01-04 20:52 UTC (permalink / raw)
  To: io-uring

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]>

---

diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index dcd8a563ab52..128a67a40065 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -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.
@@ -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;
 
-- 
Jens Axboe


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-04 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 20:52 [PATCH] io_uring: move 'poll_multi_queue' bool in io_ring_ctx Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox