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