Lines Matching refs:hctx
202 struct blk_mq_hw_ctx *hctx = data; in hctx_state_show() local
204 blk_flags_show(m, hctx->state, hctx_state_name, in hctx_state_show()
230 struct blk_mq_hw_ctx *hctx = data; in hctx_flags_show() local
231 const int alloc_policy = BLK_MQ_FLAG_TO_ALLOC_POLICY(hctx->flags); in hctx_flags_show()
241 hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy), in hctx_flags_show()
340 __acquires(&hctx->lock) in hctx_dispatch_start()
342 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_start() local
344 spin_lock(&hctx->lock); in hctx_dispatch_start()
345 return seq_list_start(&hctx->dispatch, *pos); in hctx_dispatch_start()
350 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_next() local
352 return seq_list_next(v, &hctx->dispatch, pos); in hctx_dispatch_next()
356 __releases(&hctx->lock) in hctx_dispatch_stop()
358 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_stop() local
360 spin_unlock(&hctx->lock); in hctx_dispatch_stop()
372 struct blk_mq_hw_ctx *hctx; member
384 if (rq->mq_hctx == params->hctx) in hctx_show_busy_rq()
392 struct blk_mq_hw_ctx *hctx = data; in hctx_busy_show() local
393 struct show_busy_params params = { .m = m, .hctx = hctx }; in hctx_busy_show()
395 blk_mq_tagset_busy_iter(hctx->queue->tag_set, hctx_show_busy_rq, in hctx_busy_show()
409 struct blk_mq_hw_ctx *hctx = data; in hctx_type_show() local
412 seq_printf(m, "%s\n", hctx_types[hctx->type]); in hctx_type_show()
418 struct blk_mq_hw_ctx *hctx = data; in hctx_ctx_map_show() local
420 sbitmap_bitmap_show(&hctx->ctx_map, m); in hctx_ctx_map_show()
443 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_show() local
444 struct request_queue *q = hctx->queue; in hctx_tags_show()
450 if (hctx->tags) in hctx_tags_show()
451 blk_mq_debugfs_tags_show(m, hctx->tags); in hctx_tags_show()
460 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_bitmap_show() local
461 struct request_queue *q = hctx->queue; in hctx_tags_bitmap_show()
467 if (hctx->tags) in hctx_tags_bitmap_show()
468 sbitmap_bitmap_show(&hctx->tags->bitmap_tags.sb, m); in hctx_tags_bitmap_show()
477 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_show() local
478 struct request_queue *q = hctx->queue; in hctx_sched_tags_show()
484 if (hctx->sched_tags) in hctx_sched_tags_show()
485 blk_mq_debugfs_tags_show(m, hctx->sched_tags); in hctx_sched_tags_show()
494 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_bitmap_show() local
495 struct request_queue *q = hctx->queue; in hctx_sched_tags_bitmap_show()
501 if (hctx->sched_tags) in hctx_sched_tags_bitmap_show()
502 sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags.sb, m); in hctx_sched_tags_bitmap_show()
511 struct blk_mq_hw_ctx *hctx = data; in hctx_run_show() local
513 seq_printf(m, "%lu\n", hctx->run); in hctx_run_show()
520 struct blk_mq_hw_ctx *hctx = data; in hctx_run_write() local
522 hctx->run = 0; in hctx_run_write()
528 struct blk_mq_hw_ctx *hctx = data; in hctx_active_show() local
530 seq_printf(m, "%d\n", __blk_mq_active_requests(hctx)); in hctx_active_show()
536 struct blk_mq_hw_ctx *hctx = data; in hctx_dispatch_busy_show() local
538 seq_printf(m, "%u\n", hctx->dispatch_busy); in hctx_dispatch_busy_show()
683 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register() local
697 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_debugfs_register()
698 if (!hctx->debugfs_dir) in blk_mq_debugfs_register()
699 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register()
700 if (q->elevator && !hctx->sched_debugfs_dir) in blk_mq_debugfs_register()
701 blk_mq_debugfs_register_sched_hctx(q, hctx); in blk_mq_debugfs_register()
714 static void blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx, in blk_mq_debugfs_register_ctx() argument
721 ctx_dir = debugfs_create_dir(name, hctx->debugfs_dir); in blk_mq_debugfs_register_ctx()
727 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_hctx() argument
736 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num); in blk_mq_debugfs_register_hctx()
737 hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir); in blk_mq_debugfs_register_hctx()
739 debugfs_create_files(hctx->debugfs_dir, hctx, blk_mq_debugfs_hctx_attrs); in blk_mq_debugfs_register_hctx()
741 hctx_for_each_ctx(hctx, ctx, i) in blk_mq_debugfs_register_hctx()
742 blk_mq_debugfs_register_ctx(hctx, ctx); in blk_mq_debugfs_register_hctx()
745 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_hctx() argument
747 if (!hctx->queue->debugfs_dir) in blk_mq_debugfs_unregister_hctx()
749 debugfs_remove_recursive(hctx->debugfs_dir); in blk_mq_debugfs_unregister_hctx()
750 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
751 hctx->debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
756 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register_hctxs() local
759 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_register_hctxs()
760 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register_hctxs()
765 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_unregister_hctxs() local
768 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_unregister_hctxs()
769 blk_mq_debugfs_unregister_hctx(hctx); in blk_mq_debugfs_unregister_hctxs()
845 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_sched_hctx() argument
856 if (!hctx->debugfs_dir) in blk_mq_debugfs_register_sched_hctx()
862 hctx->sched_debugfs_dir = debugfs_create_dir("sched", in blk_mq_debugfs_register_sched_hctx()
863 hctx->debugfs_dir); in blk_mq_debugfs_register_sched_hctx()
864 debugfs_create_files(hctx->sched_debugfs_dir, hctx, in blk_mq_debugfs_register_sched_hctx()
868 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_sched_hctx() argument
870 lockdep_assert_held(&hctx->queue->debugfs_mutex); in blk_mq_debugfs_unregister_sched_hctx()
872 if (!hctx->queue->debugfs_dir) in blk_mq_debugfs_unregister_sched_hctx()
874 debugfs_remove_recursive(hctx->sched_debugfs_dir); in blk_mq_debugfs_unregister_sched_hctx()
875 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_sched_hctx()