Lines Matching refs:hctx
168 struct blk_mq_hw_ctx *hctx = data;
171 blk_flags_show(m, hctx->state, hctx_state_name,
190 struct blk_mq_hw_ctx *hctx = data;
194 blk_flags_show(m, hctx->flags, hctx_flag_name,
298 __acquires(&hctx->lock)
300 struct blk_mq_hw_ctx *hctx = m->private;
302 spin_lock(&hctx->lock);
303 return seq_list_start(&hctx->dispatch, *pos);
308 struct blk_mq_hw_ctx *hctx = m->private;
310 return seq_list_next(v, &hctx->dispatch, pos);
314 __releases(&hctx->lock)
316 struct blk_mq_hw_ctx *hctx = m->private;
318 spin_unlock(&hctx->lock);
330 struct blk_mq_hw_ctx *hctx;
342 if (rq->mq_hctx == params->hctx)
350 struct blk_mq_hw_ctx *hctx = data;
351 struct show_busy_params params = { .m = m, .hctx = hctx };
354 res = mutex_lock_interruptible(&hctx->queue->elevator_lock);
357 blk_mq_tagset_busy_iter(hctx->queue->tag_set, hctx_show_busy_rq,
359 mutex_unlock(&hctx->queue->elevator_lock);
372 struct blk_mq_hw_ctx *hctx = data;
375 seq_printf(m, "%s\n", hctx_types[hctx->type]);
381 struct blk_mq_hw_ctx *hctx = data;
383 sbitmap_bitmap_show(&hctx->ctx_map, m);
406 struct blk_mq_hw_ctx *hctx = data;
407 struct request_queue *q = hctx->queue;
413 if (hctx->tags)
414 blk_mq_debugfs_tags_show(m, hctx->tags);
422 struct blk_mq_hw_ctx *hctx = data;
423 struct request_queue *q = hctx->queue;
429 if (hctx->tags)
430 sbitmap_bitmap_show(&hctx->tags->bitmap_tags.sb, m);
438 struct blk_mq_hw_ctx *hctx = data;
439 struct request_queue *q = hctx->queue;
445 if (hctx->sched_tags)
446 blk_mq_debugfs_tags_show(m, hctx->sched_tags);
454 struct blk_mq_hw_ctx *hctx = data;
455 struct request_queue *q = hctx->queue;
461 if (hctx->sched_tags)
462 sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags.sb, m);
470 struct blk_mq_hw_ctx *hctx = data;
472 seq_printf(m, "%d\n", __blk_mq_active_requests(hctx));
478 struct blk_mq_hw_ctx *hctx = data;
480 seq_printf(m, "%u\n", hctx->dispatch_busy);
622 struct blk_mq_hw_ctx *hctx;
627 queue_for_each_hw_ctx(q, hctx, i) {
628 if (!hctx->debugfs_dir)
629 blk_mq_debugfs_register_hctx(q, hctx);
642 static void blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx,
649 ctx_dir = debugfs_create_dir(name, hctx->debugfs_dir);
655 struct blk_mq_hw_ctx *hctx)
664 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num);
665 hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir);
667 debugfs_create_files(hctx->debugfs_dir, hctx, blk_mq_debugfs_hctx_attrs);
669 hctx_for_each_ctx(hctx, ctx, i)
670 blk_mq_debugfs_register_ctx(hctx, ctx);
673 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx)
675 if (!hctx->queue->debugfs_dir)
677 debugfs_remove_recursive(hctx->debugfs_dir);
678 hctx->sched_debugfs_dir = NULL;
679 hctx->debugfs_dir = NULL;
684 struct blk_mq_hw_ctx *hctx;
687 queue_for_each_hw_ctx(q, hctx, i)
688 blk_mq_debugfs_register_hctx(q, hctx);
693 struct blk_mq_hw_ctx *hctx;
696 queue_for_each_hw_ctx(q, hctx, i)
697 blk_mq_debugfs_unregister_hctx(hctx);
771 struct blk_mq_hw_ctx *hctx)
782 if (!hctx->debugfs_dir)
788 hctx->sched_debugfs_dir = debugfs_create_dir("sched",
789 hctx->debugfs_dir);
790 debugfs_create_files(hctx->sched_debugfs_dir, hctx,
794 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx)
796 lockdep_assert_held(&hctx->queue->debugfs_mutex);
798 if (!hctx->queue->debugfs_dir)
800 debugfs_remove_recursive(hctx->sched_debugfs_dir);
801 hctx->sched_debugfs_dir = NULL;