Lines Matching refs:hctx

227 	struct blk_mq_hw_ctx *hctx = data;  in hctx_state_show()  local
229 blk_flags_show(m, hctx->state, hctx_state_name, in hctx_state_show()
255 struct blk_mq_hw_ctx *hctx = data; in hctx_flags_show() local
256 const int alloc_policy = BLK_MQ_FLAG_TO_ALLOC_POLICY(hctx->flags); in hctx_flags_show()
266 hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy), in hctx_flags_show()
363 __acquires(&hctx->lock) in hctx_dispatch_start()
365 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_start() local
367 spin_lock(&hctx->lock); in hctx_dispatch_start()
368 return seq_list_start(&hctx->dispatch, *pos); in hctx_dispatch_start()
373 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_next() local
375 return seq_list_next(v, &hctx->dispatch, pos); in hctx_dispatch_next()
379 __releases(&hctx->lock) in hctx_dispatch_stop()
381 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_stop() local
383 spin_unlock(&hctx->lock); in hctx_dispatch_stop()
395 struct blk_mq_hw_ctx *hctx; member
407 if (rq->mq_hctx == params->hctx) in hctx_show_busy_rq()
415 struct blk_mq_hw_ctx *hctx = data; in hctx_busy_show() local
416 struct show_busy_params params = { .m = m, .hctx = hctx }; in hctx_busy_show()
418 blk_mq_tagset_busy_iter(hctx->queue->tag_set, hctx_show_busy_rq, in hctx_busy_show()
432 struct blk_mq_hw_ctx *hctx = data; in hctx_type_show() local
435 seq_printf(m, "%s\n", hctx_types[hctx->type]); in hctx_type_show()
441 struct blk_mq_hw_ctx *hctx = data; in hctx_ctx_map_show() local
443 sbitmap_bitmap_show(&hctx->ctx_map, m); in hctx_ctx_map_show()
466 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_show() local
467 struct request_queue *q = hctx->queue; in hctx_tags_show()
473 if (hctx->tags) in hctx_tags_show()
474 blk_mq_debugfs_tags_show(m, hctx->tags); in hctx_tags_show()
483 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_bitmap_show() local
484 struct request_queue *q = hctx->queue; in hctx_tags_bitmap_show()
490 if (hctx->tags) in hctx_tags_bitmap_show()
491 sbitmap_bitmap_show(&hctx->tags->bitmap_tags.sb, m); in hctx_tags_bitmap_show()
500 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_show() local
501 struct request_queue *q = hctx->queue; in hctx_sched_tags_show()
507 if (hctx->sched_tags) in hctx_sched_tags_show()
508 blk_mq_debugfs_tags_show(m, hctx->sched_tags); in hctx_sched_tags_show()
517 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_bitmap_show() local
518 struct request_queue *q = hctx->queue; in hctx_sched_tags_bitmap_show()
524 if (hctx->sched_tags) in hctx_sched_tags_bitmap_show()
525 sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags.sb, m); in hctx_sched_tags_bitmap_show()
534 struct blk_mq_hw_ctx *hctx = data; in hctx_run_show() local
536 seq_printf(m, "%lu\n", hctx->run); in hctx_run_show()
543 struct blk_mq_hw_ctx *hctx = data; in hctx_run_write() local
545 hctx->run = 0; in hctx_run_write()
551 struct blk_mq_hw_ctx *hctx = data; in hctx_active_show() local
553 seq_printf(m, "%d\n", __blk_mq_active_requests(hctx)); in hctx_active_show()
559 struct blk_mq_hw_ctx *hctx = data; in hctx_dispatch_busy_show() local
561 seq_printf(m, "%u\n", hctx->dispatch_busy); in hctx_dispatch_busy_show()
706 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register() local
720 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_debugfs_register()
721 if (!hctx->debugfs_dir) in blk_mq_debugfs_register()
722 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register()
723 if (q->elevator && !hctx->sched_debugfs_dir) in blk_mq_debugfs_register()
724 blk_mq_debugfs_register_sched_hctx(q, hctx); in blk_mq_debugfs_register()
742 static void blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx, in blk_mq_debugfs_register_ctx() argument
749 ctx_dir = debugfs_create_dir(name, hctx->debugfs_dir); in blk_mq_debugfs_register_ctx()
755 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_hctx() argument
761 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num); in blk_mq_debugfs_register_hctx()
762 hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir); in blk_mq_debugfs_register_hctx()
764 debugfs_create_files(hctx->debugfs_dir, hctx, blk_mq_debugfs_hctx_attrs); in blk_mq_debugfs_register_hctx()
766 hctx_for_each_ctx(hctx, ctx, i) in blk_mq_debugfs_register_hctx()
767 blk_mq_debugfs_register_ctx(hctx, ctx); in blk_mq_debugfs_register_hctx()
770 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_hctx() argument
772 debugfs_remove_recursive(hctx->debugfs_dir); in blk_mq_debugfs_unregister_hctx()
773 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
774 hctx->debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
779 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register_hctxs() local
782 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_register_hctxs()
783 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register_hctxs()
788 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_unregister_hctxs() local
791 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_unregister_hctxs()
792 blk_mq_debugfs_unregister_hctx(hctx); in blk_mq_debugfs_unregister_hctxs()
866 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_sched_hctx() argument
875 if (!hctx->debugfs_dir) in blk_mq_debugfs_register_sched_hctx()
881 hctx->sched_debugfs_dir = debugfs_create_dir("sched", in blk_mq_debugfs_register_sched_hctx()
882 hctx->debugfs_dir); in blk_mq_debugfs_register_sched_hctx()
883 debugfs_create_files(hctx->sched_debugfs_dir, hctx, in blk_mq_debugfs_register_sched_hctx()
887 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_sched_hctx() argument
889 debugfs_remove_recursive(hctx->sched_debugfs_dir); in blk_mq_debugfs_unregister_sched_hctx()
890 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_sched_hctx()