io_wq
qp = phba->sli4_hba.hdwq[qidx].io_wq;
qp = phba->sli4_hba.hdwq[qidx].io_wq;
txcmplq_cnt = qp->io_wq->pring->txcmplq_cnt;
wq = phba->sli4_hba.hdwq[wqidx].io_wq;
wq = phba->sli4_hba.hdwq[wqidx].io_wq;
if (phba->sli4_hba.hdwq[wq_idx].io_wq->queue_id == qid)
lpfc_debug_dump_q(phba->sli4_hba.hdwq[wq_idx].io_wq);
phba->sli4_hba.hdwq[idx].io_wq = qdesc;
lpfc_sli4_queue_free(hdwq[idx].io_wq);
hdwq[idx].io_wq = NULL;
qp[qidx].io_wq,
lpfc_wq_destroy(phba, qp->io_wq);
if (!vport->localport || !qp || !qp->io_wq)
pring = qp->io_wq->pring;
if (!phba->sli4_hba.hdwq[i].io_wq)
pring = phba->sli4_hba.hdwq[i].io_wq->pring;
wq = ctxp->hdwq->io_wq;
wq = ctxp->hdwq->io_wq;
wq = phba->sli4_hba.hdwq[qidx].io_wq;
if (!phba->sli4_hba.hdwq[iocb->hba_wqidx].io_wq ||
!phba->sli4_hba.hdwq[iocb->hba_wqidx].io_wq->pring) {
pring_s4 = phba->sli4_hba.hdwq[iocb->hba_wqidx].io_wq->pring;
wq = phba->sli4_hba.hdwq[piocb->hba_wqidx].io_wq;
return phba->sli4_hba.hdwq[piocb->hba_wqidx].io_wq->pring;
pring = phba->sli4_hba.hdwq[i].io_wq->pring;
phba->sli4_hba.hdwq[iocbq->hba_wqidx].io_wq->pring;
wq = phba->sli4_hba.hdwq[0].io_wq;
wq = qp->io_wq;
wq = qp->io_wq;
txcmplq_cnt = qp->io_wq->pring->txcmplq_cnt;
txcmplq_cnt = qp->io_wq->pring->txcmplq_cnt;
txcmplq_cnt = qp->io_wq->pring->txcmplq_cnt;
cpu_to_node(hdwq->io_wq->chann));
cpu_to_node(hdwq->io_wq->chann));
pring = phba->sli4_hba.hdwq[i].io_wq->pring;
!phba->sli4_hba.hdwq[i].io_wq) {
pring = phba->sli4_hba.hdwq[i].io_wq->pring;
struct lpfc_queue *io_wq; /* Fast-path FCP & NVME work queue */
struct io_wq *io_wq;
if (!tctx || !tctx->io_wq)
cret = io_wq_cancel_cb(tctx->io_wq, io_cancel_ctx_cb, ctx, true);
} else if (tctx->io_wq) {
cret = io_wq_cancel_cb(tctx->io_wq, io_cancel_task_cb,
if (tctx->io_wq)
io_wq_exit_start(tctx->io_wq);
if (!tctx || !tctx->io_wq)
cancel_ret = io_wq_cancel_cb(tctx->io_wq, io_cancel_cb, cd, all);
void io_wq_enqueue(struct io_wq *wq, struct io_wq_work *work)
static inline void io_wq_remove_pending(struct io_wq *wq,
static bool io_acct_cancel_pending_work(struct io_wq *wq,
static void io_wq_cancel_pending_work(struct io_wq *wq,
static void io_wq_cancel_running_work(struct io_wq *wq,
enum io_wq_cancel io_wq_cancel_cb(struct io_wq *wq, work_cancel_fn *cancel,
struct io_wq *wq = container_of(wait, struct io_wq, wait);
struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
struct io_wq *wq;
wq = kzalloc_obj(struct io_wq);
void io_wq_exit_start(struct io_wq *wq)
static void io_wq_cancel_tw_create(struct io_wq *wq)
static void io_wq_exit_workers(struct io_wq *wq)
static void io_wq_destroy(struct io_wq *wq)
void io_wq_put_and_exit(struct io_wq *wq)
static int __io_wq_cpu_online(struct io_wq *wq, unsigned int cpu, bool online)
struct io_wq *wq = hlist_entry_safe(node, struct io_wq, cpuhp_node);
struct io_wq *wq = hlist_entry_safe(node, struct io_wq, cpuhp_node);
if (!tctx || !tctx->io_wq)
cpuset_cpus_allowed(tctx->io_wq->task, allowed_mask);
cpumask_copy(tctx->io_wq->cpu_mask, mask);
cpumask_copy(tctx->io_wq->cpu_mask, allowed_mask);
static bool create_io_worker(struct io_wq *wq, struct io_wq_acct *acct);
int io_wq_max_workers(struct io_wq *wq, int *new_count)
static bool io_acct_cancel_pending_work(struct io_wq *wq,
static void io_wq_cancel_tw_create(struct io_wq *wq);
static inline struct io_wq_acct *io_get_acct(struct io_wq *wq, bool bound)
static inline struct io_wq_acct *io_work_get_acct(struct io_wq *wq,
static void io_worker_ref_put(struct io_wq *wq)
struct io_wq *wq = worker->wq;
struct io_wq *wq = worker->wq;
static bool io_wq_create_worker(struct io_wq *wq, struct io_wq_acct *acct)
struct io_wq *wq;
struct io_wq *wq = worker->wq;
struct io_wq *wq = worker->wq;
static bool io_wait_on_hash(struct io_wq *wq, unsigned int hash)
struct io_wq *wq)
struct io_wq *wq;
struct io_wq *wq = worker->wq;
struct io_wq *wq = worker->wq;
static void io_init_new_worker(struct io_wq *wq, struct io_wq_acct *acct, struct io_worker *worker,
struct io_wq *wq;
static bool create_io_worker(struct io_wq *wq, struct io_wq_acct *acct)
static void io_wq_for_each_worker(struct io_wq *wq,
void io_wq_set_exit_on_idle(struct io_wq *wq, bool enable)
static void io_run_cancel(struct io_wq_work *work, struct io_wq *wq)
static void io_wq_insert_work(struct io_wq *wq, struct io_wq_acct *acct,
struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data);
void io_wq_exit_start(struct io_wq *wq);
void io_wq_put_and_exit(struct io_wq *wq);
void io_wq_set_exit_on_idle(struct io_wq *wq, bool enable);
void io_wq_enqueue(struct io_wq *wq, struct io_wq_work *work);
int io_wq_max_workers(struct io_wq *wq, int *new_count);
enum io_wq_cancel io_wq_cancel_cb(struct io_wq *wq, work_cancel_fn *cancel,
struct io_wq;
if (tsk && tsk->io_uring && tsk->io_uring->io_wq)
io_wq_cancel_cb(tsk->io_uring->io_wq,
if ((current->flags & PF_KTHREAD) || !tctx->io_wq) {
io_wq_enqueue(tctx->io_wq, &req->work);
if (tctx && tctx->io_wq) {
ret = io_wq_max_workers(tctx->io_wq, new_count);
if (WARN_ON_ONCE(!tctx->io_wq))
(void)io_wq_max_workers(tctx->io_wq, new_count);
ret = PTR_ERR(tctx->io_wq);
static struct io_wq *io_init_wq_offload(struct io_ring_ctx *ctx,
ret = io_wq_max_workers(tctx->io_wq, limits);
if (tctx->io_wq)
io_wq_set_exit_on_idle(tctx->io_wq, false);
if (tctx->io_wq) {
io_wq_exit_start(tctx->io_wq);
io_wq_put_and_exit(tctx->io_wq);
if (xa_empty(&tctx->xa) && tctx->io_wq)
io_wq_set_exit_on_idle(tctx->io_wq, true);
struct io_wq *wq = tctx->io_wq;
tctx->io_wq = NULL;
WARN_ON_ONCE(tctx->io_wq);
tctx->io_wq = io_init_wq_offload(ctx, task);
if (IS_ERR(tctx->io_wq)) {