Lines Matching refs:hctx

221 	struct blk_mq_hw_ctx *hctx = data;  in hctx_state_show()  local
223 blk_flags_show(m, hctx->state, hctx_state_name, in hctx_state_show()
247 struct blk_mq_hw_ctx *hctx = data; in hctx_flags_show() local
248 const int alloc_policy = BLK_MQ_FLAG_TO_ALLOC_POLICY(hctx->flags); in hctx_flags_show()
258 hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy), in hctx_flags_show()
358 __acquires(&hctx->lock) in hctx_dispatch_start()
360 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_start() local
362 spin_lock(&hctx->lock); in hctx_dispatch_start()
363 return seq_list_start(&hctx->dispatch, *pos); in hctx_dispatch_start()
368 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_next() local
370 return seq_list_next(v, &hctx->dispatch, pos); in hctx_dispatch_next()
374 __releases(&hctx->lock) in hctx_dispatch_stop()
376 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_stop() local
378 spin_unlock(&hctx->lock); in hctx_dispatch_stop()
390 struct blk_mq_hw_ctx *hctx; member
402 if (rq->mq_hctx == params->hctx) in hctx_show_busy_rq()
411 struct blk_mq_hw_ctx *hctx = data; in hctx_busy_show() local
412 struct show_busy_params params = { .m = m, .hctx = hctx }; in hctx_busy_show()
414 blk_mq_tagset_busy_iter(hctx->queue->tag_set, hctx_show_busy_rq, in hctx_busy_show()
428 struct blk_mq_hw_ctx *hctx = data; in hctx_type_show() local
431 seq_printf(m, "%s\n", hctx_types[hctx->type]); in hctx_type_show()
437 struct blk_mq_hw_ctx *hctx = data; in hctx_ctx_map_show() local
439 sbitmap_bitmap_show(&hctx->ctx_map, m); in hctx_ctx_map_show()
462 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_show() local
463 struct request_queue *q = hctx->queue; in hctx_tags_show()
469 if (hctx->tags) in hctx_tags_show()
470 blk_mq_debugfs_tags_show(m, hctx->tags); in hctx_tags_show()
479 struct blk_mq_hw_ctx *hctx = data; in hctx_tags_bitmap_show() local
480 struct request_queue *q = hctx->queue; in hctx_tags_bitmap_show()
486 if (hctx->tags) in hctx_tags_bitmap_show()
487 sbitmap_bitmap_show(&hctx->tags->bitmap_tags.sb, m); in hctx_tags_bitmap_show()
496 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_show() local
497 struct request_queue *q = hctx->queue; in hctx_sched_tags_show()
503 if (hctx->sched_tags) in hctx_sched_tags_show()
504 blk_mq_debugfs_tags_show(m, hctx->sched_tags); in hctx_sched_tags_show()
513 struct blk_mq_hw_ctx *hctx = data; in hctx_sched_tags_bitmap_show() local
514 struct request_queue *q = hctx->queue; in hctx_sched_tags_bitmap_show()
520 if (hctx->sched_tags) in hctx_sched_tags_bitmap_show()
521 sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags.sb, m); in hctx_sched_tags_bitmap_show()
530 struct blk_mq_hw_ctx *hctx = data; in hctx_io_poll_show() local
532 seq_printf(m, "considered=%lu\n", hctx->poll_considered); in hctx_io_poll_show()
533 seq_printf(m, "invoked=%lu\n", hctx->poll_invoked); in hctx_io_poll_show()
534 seq_printf(m, "success=%lu\n", hctx->poll_success); in hctx_io_poll_show()
541 struct blk_mq_hw_ctx *hctx = data; in hctx_io_poll_write() local
543 hctx->poll_considered = hctx->poll_invoked = hctx->poll_success = 0; in hctx_io_poll_write()
549 struct blk_mq_hw_ctx *hctx = data; in hctx_dispatched_show() local
552 seq_printf(m, "%8u\t%lu\n", 0U, hctx->dispatched[0]); in hctx_dispatched_show()
557 seq_printf(m, "%8u\t%lu\n", d, hctx->dispatched[i]); in hctx_dispatched_show()
560 seq_printf(m, "%8u+\t%lu\n", 1U << (i - 1), hctx->dispatched[i]); in hctx_dispatched_show()
567 struct blk_mq_hw_ctx *hctx = data; in hctx_dispatched_write() local
571 hctx->dispatched[i] = 0; in hctx_dispatched_write()
577 struct blk_mq_hw_ctx *hctx = data; in hctx_queued_show() local
579 seq_printf(m, "%lu\n", hctx->queued); in hctx_queued_show()
586 struct blk_mq_hw_ctx *hctx = data; in hctx_queued_write() local
588 hctx->queued = 0; in hctx_queued_write()
594 struct blk_mq_hw_ctx *hctx = data; in hctx_run_show() local
596 seq_printf(m, "%lu\n", hctx->run); in hctx_run_show()
603 struct blk_mq_hw_ctx *hctx = data; in hctx_run_write() local
605 hctx->run = 0; in hctx_run_write()
611 struct blk_mq_hw_ctx *hctx = data; in hctx_active_show() local
613 seq_printf(m, "%d\n", atomic_read(&hctx->nr_active)); in hctx_active_show()
619 struct blk_mq_hw_ctx *hctx = data; in hctx_dispatch_busy_show() local
621 seq_printf(m, "%u\n", hctx->dispatch_busy); in hctx_dispatch_busy_show()
823 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register() local
840 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_debugfs_register()
841 if (!hctx->debugfs_dir) in blk_mq_debugfs_register()
842 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register()
843 if (q->elevator && !hctx->sched_debugfs_dir) in blk_mq_debugfs_register()
844 blk_mq_debugfs_register_sched_hctx(q, hctx); in blk_mq_debugfs_register()
864 static void blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx, in blk_mq_debugfs_register_ctx() argument
871 ctx_dir = debugfs_create_dir(name, hctx->debugfs_dir); in blk_mq_debugfs_register_ctx()
877 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_hctx() argument
883 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num); in blk_mq_debugfs_register_hctx()
884 hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir); in blk_mq_debugfs_register_hctx()
886 debugfs_create_files(hctx->debugfs_dir, hctx, blk_mq_debugfs_hctx_attrs); in blk_mq_debugfs_register_hctx()
888 hctx_for_each_ctx(hctx, ctx, i) in blk_mq_debugfs_register_hctx()
889 blk_mq_debugfs_register_ctx(hctx, ctx); in blk_mq_debugfs_register_hctx()
892 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_hctx() argument
894 debugfs_remove_recursive(hctx->debugfs_dir); in blk_mq_debugfs_unregister_hctx()
895 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
896 hctx->debugfs_dir = NULL; in blk_mq_debugfs_unregister_hctx()
901 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_register_hctxs() local
904 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_register_hctxs()
905 blk_mq_debugfs_register_hctx(q, hctx); in blk_mq_debugfs_register_hctxs()
910 struct blk_mq_hw_ctx *hctx; in blk_mq_debugfs_unregister_hctxs() local
913 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_debugfs_unregister_hctxs()
914 blk_mq_debugfs_unregister_hctx(hctx); in blk_mq_debugfs_unregister_hctxs()
973 struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_register_sched_hctx() argument
980 hctx->sched_debugfs_dir = debugfs_create_dir("sched", in blk_mq_debugfs_register_sched_hctx()
981 hctx->debugfs_dir); in blk_mq_debugfs_register_sched_hctx()
982 debugfs_create_files(hctx->sched_debugfs_dir, hctx, in blk_mq_debugfs_register_sched_hctx()
986 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx) in blk_mq_debugfs_unregister_sched_hctx() argument
988 debugfs_remove_recursive(hctx->sched_debugfs_dir); in blk_mq_debugfs_unregister_sched_hctx()
989 hctx->sched_debugfs_dir = NULL; in blk_mq_debugfs_unregister_sched_hctx()