@@ -256,6 +256,15 @@ struct io_ring_ctx {
256
256
struct io_hash_table cancel_table_locked ;
257
257
struct io_alloc_cache apoll_cache ;
258
258
struct io_alloc_cache netmsg_cache ;
259
+
260
+ /*
261
+ * ->iopoll_list is protected by the ctx->uring_lock for
262
+ * io_uring instances that don't use IORING_SETUP_SQPOLL.
263
+ * For SQPOLL, only the single threaded io_sq_thread() will
264
+ * manipulate the list, hence no extra locking is needed there.
265
+ */
266
+ struct io_wq_work_list iopoll_list ;
267
+ bool poll_multi_queue ;
259
268
} ____cacheline_aligned_in_smp ;
260
269
261
270
struct {
@@ -284,20 +293,6 @@ struct io_ring_ctx {
284
293
struct wait_queue_head cq_wait ;
285
294
} ____cacheline_aligned_in_smp ;
286
295
287
- struct {
288
- spinlock_t completion_lock ;
289
-
290
- bool poll_multi_queue ;
291
-
292
- /*
293
- * ->iopoll_list is protected by the ctx->uring_lock for
294
- * io_uring instances that don't use IORING_SETUP_SQPOLL.
295
- * For SQPOLL, only the single threaded io_sq_thread() will
296
- * manipulate the list, hence no extra locking is needed there.
297
- */
298
- struct io_wq_work_list iopoll_list ;
299
- } ____cacheline_aligned_in_smp ;
300
-
301
296
/* timeouts */
302
297
struct {
303
298
spinlock_t timeout_lock ;
@@ -308,6 +303,8 @@ struct io_ring_ctx {
308
303
309
304
struct io_uring_cqe completion_cqes [16 ];
310
305
306
+ spinlock_t completion_lock ;
307
+
311
308
/* IRQ completion list, under ->completion_lock */
312
309
struct io_wq_work_list locked_free_list ;
313
310
unsigned int locked_free_nr ;
0 commit comments