Lines Matching refs:hctx

455 static void kyber_depth_updated(struct blk_mq_hw_ctx *hctx)  in kyber_depth_updated()  argument
457 struct kyber_queue_data *kqd = hctx->queue->elevator->elevator_data; in kyber_depth_updated()
458 struct blk_mq_tags *tags = hctx->sched_tags; in kyber_depth_updated()
466 static int kyber_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx) in kyber_init_hctx() argument
471 khd = kmalloc_node(sizeof(*khd), GFP_KERNEL, hctx->numa_node); in kyber_init_hctx()
475 khd->kcqs = kmalloc_array_node(hctx->nr_ctx, in kyber_init_hctx()
477 GFP_KERNEL, hctx->numa_node); in kyber_init_hctx()
481 for (i = 0; i < hctx->nr_ctx; i++) in kyber_init_hctx()
485 if (sbitmap_init_node(&khd->kcq_map[i], hctx->nr_ctx, in kyber_init_hctx()
486 ilog2(8), GFP_KERNEL, hctx->numa_node, in kyber_init_hctx()
501 khd->domain_wait[i].wait.private = hctx; in kyber_init_hctx()
509 hctx->sched_data = khd; in kyber_init_hctx()
510 kyber_depth_updated(hctx); in kyber_init_hctx()
521 static void kyber_exit_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx) in kyber_exit_hctx() argument
523 struct kyber_hctx_data *khd = hctx->sched_data; in kyber_exit_hctx()
529 kfree(hctx->sched_data); in kyber_exit_hctx()
573 struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, bio->bi_opf, ctx); in kyber_bio_merge() local
574 struct kyber_hctx_data *khd = hctx->sched_data; in kyber_bio_merge()
575 struct kyber_ctx_queue *kcq = &khd->kcqs[ctx->index_hw[hctx->type]]; in kyber_bio_merge()
581 merged = blk_bio_list_merge(hctx->queue, rq_list, bio, nr_segs); in kyber_bio_merge()
592 static void kyber_insert_requests(struct blk_mq_hw_ctx *hctx, in kyber_insert_requests() argument
595 struct kyber_hctx_data *khd = hctx->sched_data; in kyber_insert_requests()
600 struct kyber_ctx_queue *kcq = &khd->kcqs[rq->mq_ctx->index_hw[hctx->type]]; in kyber_insert_requests()
610 rq->mq_ctx->index_hw[hctx->type]); in kyber_insert_requests()
699 struct blk_mq_hw_ctx *hctx = READ_ONCE(wqe->private); in kyber_domain_wake() local
703 blk_mq_run_hw_queue(hctx, true); in kyber_domain_wake()
709 struct blk_mq_hw_ctx *hctx) in kyber_get_domain_token() argument
757 struct blk_mq_hw_ctx *hctx) in kyber_dispatch_cur_domain() argument
775 nr = kyber_get_domain_token(kqd, khd, hctx); in kyber_dispatch_cur_domain()
786 nr = kyber_get_domain_token(kqd, khd, hctx); in kyber_dispatch_cur_domain()
804 static struct request *kyber_dispatch_request(struct blk_mq_hw_ctx *hctx) in kyber_dispatch_request() argument
806 struct kyber_queue_data *kqd = hctx->queue->elevator->elevator_data; in kyber_dispatch_request()
807 struct kyber_hctx_data *khd = hctx->sched_data; in kyber_dispatch_request()
818 rq = kyber_dispatch_cur_domain(kqd, khd, hctx); in kyber_dispatch_request()
839 rq = kyber_dispatch_cur_domain(kqd, khd, hctx); in kyber_dispatch_request()
850 static bool kyber_has_work(struct blk_mq_hw_ctx *hctx) in kyber_has_work() argument
852 struct kyber_hctx_data *khd = hctx->sched_data; in kyber_has_work()
914 struct blk_mq_hw_ctx *hctx = m->private; \
915 struct kyber_hctx_data *khd = hctx->sched_data; \
924 struct blk_mq_hw_ctx *hctx = m->private; \
925 struct kyber_hctx_data *khd = hctx->sched_data; \
933 struct blk_mq_hw_ctx *hctx = m->private; \
934 struct kyber_hctx_data *khd = hctx->sched_data; \
948 struct blk_mq_hw_ctx *hctx = data; \
949 struct kyber_hctx_data *khd = hctx->sched_data; \
972 struct blk_mq_hw_ctx *hctx = data; in kyber_cur_domain_show() local
973 struct kyber_hctx_data *khd = hctx->sched_data; in kyber_cur_domain_show()
981 struct blk_mq_hw_ctx *hctx = data; in kyber_batching_show() local
982 struct kyber_hctx_data *khd = hctx->sched_data; in kyber_batching_show()