Lines Matching refs:hctx

178 	struct blk_mq_hw_ctx *hctx = data;  in hctx_state_show()  local
180 blk_flags_show(m, hctx->state, hctx_state_name, in hctx_state_show()
206 struct blk_mq_hw_ctx *hctx = data; in hctx_flags_show() local
207 const int alloc_policy = BLK_MQ_FLAG_TO_ALLOC_POLICY(hctx->flags); in hctx_flags_show()
217 hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy), in hctx_flags_show()
314 __acquires(&hctx->lock) in hctx_dispatch_start()
316 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_start() local
318 spin_lock(&hctx->lock); in hctx_dispatch_start()
319 return seq_list_start(&hctx->dispatch, *pos); in hctx_dispatch_start()
324 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_next() local
326 return seq_list_next(v, &hctx->dispatch, pos); in hctx_dispatch_next()
330 __releases(&hctx->lock) in hctx_dispatch_stop()
332 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_stop() local
334 spin_unlock(&hctx->lock); in hctx_dispatch_stop()
346 struct blk_mq_hw_ctx *hctx; member
358 if (rq->mq_hctx == params->hctx) in hctx_show_busy_rq()
366 struct blk_mq_hw_ctx *hctx = data; in hctx_busy_show() local
367 struct show_busy_params params = { .m = m, .hctx = hctx }; in hctx_busy_show()
369 blk_mq_tagset_busy_iter(hctx->queue->tag_set, hctx_show_busy_rq, in hctx_busy_show()
383 struct blk_mq_hw_ctx *hctx = data; in hctx_type_show() local
386 seq_printf(m, "%s\n", hctx_types[hctx->type]); in hctx_type_show()
392 struct blk_mq_hw_ctx *hctx = data; in hctx_ctx_map_show() local
394 sbitmap_bitmap_show(&hctx->ctx_map, m); in hctx_ctx_map_show()
417 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_show() local
418 struct request_queue *q = hctx->queue; in hctx_tags_show()
424 if (hctx->tags) in hctx_tags_show()
425 blk_mq_debugfs_tags_show(m, hctx->tags); in hctx_tags_show()
434 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_bitmap_show() local
435 struct request_queue *q = hctx->queue; in hctx_tags_bitmap_show()
441 if (hctx->tags) in hctx_tags_bitmap_show()
442 sbitmap_bitmap_show(&hctx->tags->bitmap_tags.sb, m); in hctx_tags_bitmap_show()
451 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_show() local
452 struct request_queue *q = hctx->queue; in hctx_sched_tags_show()
458 if (hctx->sched_tags) in hctx_sched_tags_show()
459 blk_mq_debugfs_tags_show(m, hctx->sched_tags); in hctx_sched_tags_show()
468 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_bitmap_show() local
469 struct request_queue *q = hctx->queue; in hctx_sched_tags_bitmap_show()
475 if (hctx->sched_tags) in hctx_sched_tags_bitmap_show()
476 sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags.sb, m); in hctx_sched_tags_bitmap_show()
485 struct blk_mq_hw_ctx *hctx = data; in hctx_run_show() local
487 seq_printf(m, "%lu\n", hctx->run); in hctx_run_show()
494 struct blk_mq_hw_ctx *hctx = data; in hctx_run_write() local
496 hctx->run = 0; in hctx_run_write()
502 struct blk_mq_hw_ctx *hctx = data; in hctx_active_show() local
504 seq_printf(m, "%d\n", __blk_mq_active_requests(hctx)); in hctx_active_show()
510 struct blk_mq_hw_ctx *hctx = data; in hctx_dispatch_busy_show() local
512 seq_printf(m, "%u\n", hctx->dispatch_busy); in hctx_dispatch_busy_show()
657 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register() local
671 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_debugfs_register()
672 if (!hctx->debugfs_dir) in blk_mq_debugfs_register()
673 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register()
674 if (q->elevator && !hctx->sched_debugfs_dir) in blk_mq_debugfs_register()
675 blk_mq_debugfs_register_sched_hctx(q, hctx); in blk_mq_debugfs_register()
688 static void blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx, in blk_mq_debugfs_register_ctx() argument
695 ctx_dir = debugfs_create_dir(name, hctx->debugfs_dir); in blk_mq_debugfs_register_ctx()
701 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_hctx() argument
710 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num); in blk_mq_debugfs_register_hctx()
711 hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir); in blk_mq_debugfs_register_hctx()
713 debugfs_create_files(hctx->debugfs_dir, hctx, blk_mq_debugfs_hctx_attrs); in blk_mq_debugfs_register_hctx()
715 hctx_for_each_ctx(hctx, ctx, i) in blk_mq_debugfs_register_hctx()
716 blk_mq_debugfs_register_ctx(hctx, ctx); in blk_mq_debugfs_register_hctx()
719 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_hctx() argument
721 if (!hctx->queue->debugfs_dir) in blk_mq_debugfs_unregister_hctx()
723 debugfs_remove_recursive(hctx->debugfs_dir); in blk_mq_debugfs_unregister_hctx()
724 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
725 hctx->debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
730 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register_hctxs() local
733 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_register_hctxs()
734 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register_hctxs()
739 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_unregister_hctxs() local
742 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_unregister_hctxs()
743 blk_mq_debugfs_unregister_hctx(hctx); in blk_mq_debugfs_unregister_hctxs()
817 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_sched_hctx() argument
828 if (!hctx->debugfs_dir) in blk_mq_debugfs_register_sched_hctx()
834 hctx->sched_debugfs_dir = debugfs_create_dir("sched", in blk_mq_debugfs_register_sched_hctx()
835 hctx->debugfs_dir); in blk_mq_debugfs_register_sched_hctx()
836 debugfs_create_files(hctx->sched_debugfs_dir, hctx, in blk_mq_debugfs_register_sched_hctx()
840 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_sched_hctx() argument
842 lockdep_assert_held(&hctx->queue->debugfs_mutex); in blk_mq_debugfs_unregister_sched_hctx()
844 if (!hctx->queue->debugfs_dir) in blk_mq_debugfs_unregister_sched_hctx()
846 debugfs_remove_recursive(hctx->sched_debugfs_dir); in blk_mq_debugfs_unregister_sched_hctx()
847 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_sched_hctx()