117437f31SJens Axboe // SPDX-License-Identifier: GPL-2.0 217437f31SJens Axboe 317437f31SJens Axboe struct io_sq_data { 417437f31SJens Axboe refcount_t refs; 517437f31SJens Axboe atomic_t park_pending; 617437f31SJens Axboe struct mutex lock; 717437f31SJens Axboe 817437f31SJens Axboe /* ctx's that are using this sqd */ 917437f31SJens Axboe struct list_head ctx_list; 1017437f31SJens Axboe 1117437f31SJens Axboe struct task_struct *thread; 1217437f31SJens Axboe struct wait_queue_head wait; 1317437f31SJens Axboe 1417437f31SJens Axboe unsigned sq_thread_idle; 1517437f31SJens Axboe int sq_cpu; 1617437f31SJens Axboe pid_t task_pid; 1717437f31SJens Axboe pid_t task_tgid; 1817437f31SJens Axboe 19*3fcb9d17SXiaobing Li u64 work_time; 2017437f31SJens Axboe unsigned long state; 2117437f31SJens Axboe struct completion exited; 2217437f31SJens Axboe }; 2317437f31SJens Axboe 2417437f31SJens Axboe int io_sq_offload_create(struct io_ring_ctx *ctx, struct io_uring_params *p); 2517437f31SJens Axboe void io_sq_thread_finish(struct io_ring_ctx *ctx); 2617437f31SJens Axboe void io_sq_thread_stop(struct io_sq_data *sqd); 2717437f31SJens Axboe void io_sq_thread_park(struct io_sq_data *sqd); 2817437f31SJens Axboe void io_sq_thread_unpark(struct io_sq_data *sqd); 2917437f31SJens Axboe void io_put_sq_data(struct io_sq_data *sqd); 3088b80534SQuanfa Fu void io_sqpoll_wait_sq(struct io_ring_ctx *ctx); 31ebdfefc0SJens Axboe int io_sqpoll_wq_cpu_affinity(struct io_ring_ctx *ctx, cpumask_var_t mask); 32