Lines Matching refs:hctx

228 	struct blk_mq_hw_ctx *hctx = data;
230 blk_flags_show(m, hctx->state, hctx_state_name,
256 struct blk_mq_hw_ctx *hctx = data;
257 const int alloc_policy = BLK_MQ_FLAG_TO_ALLOC_POLICY(hctx->flags);
267 hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy),
365 __acquires(&hctx->lock)
367 struct blk_mq_hw_ctx *hctx = m->private;
369 spin_lock(&hctx->lock);
370 return seq_list_start(&hctx->dispatch, *pos);
375 struct blk_mq_hw_ctx *hctx = m->private;
377 return seq_list_next(v, &hctx->dispatch, pos);
381 __releases(&hctx->lock)
383 struct blk_mq_hw_ctx *hctx = m->private;
385 spin_unlock(&hctx->lock);
397 struct blk_mq_hw_ctx *hctx;
409 if (rq->mq_hctx == params->hctx)
417 struct blk_mq_hw_ctx *hctx = data;
418 struct show_busy_params params = { .m = m, .hctx = hctx };
420 blk_mq_tagset_busy_iter(hctx->queue->tag_set, hctx_show_busy_rq,
434 struct blk_mq_hw_ctx *hctx = data;
437 seq_printf(m, "%s\n", hctx_types[hctx->type]);
443 struct blk_mq_hw_ctx *hctx = data;
445 sbitmap_bitmap_show(&hctx->ctx_map, m);
468 struct blk_mq_hw_ctx *hctx = data;
469 struct request_queue *q = hctx->queue;
475 if (hctx->tags)
476 blk_mq_debugfs_tags_show(m, hctx->tags);
485 struct blk_mq_hw_ctx *hctx = data;
486 struct request_queue *q = hctx->queue;
492 if (hctx->tags)
493 sbitmap_bitmap_show(&hctx->tags->bitmap_tags->sb, m);
502 struct blk_mq_hw_ctx *hctx = data;
503 struct request_queue *q = hctx->queue;
509 if (hctx->sched_tags)
510 blk_mq_debugfs_tags_show(m, hctx->sched_tags);
519 struct blk_mq_hw_ctx *hctx = data;
520 struct request_queue *q = hctx->queue;
526 if (hctx->sched_tags)
527 sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags->sb, m);
536 struct blk_mq_hw_ctx *hctx = data;
538 seq_printf(m, "considered=%lu\n", hctx->poll_considered);
539 seq_printf(m, "invoked=%lu\n", hctx->poll_invoked);
540 seq_printf(m, "success=%lu\n", hctx->poll_success);
547 struct blk_mq_hw_ctx *hctx = data;
549 hctx->poll_considered = hctx->poll_invoked = hctx->poll_success = 0;
555 struct blk_mq_hw_ctx *hctx = data;
558 seq_printf(m, "%8u\t%lu\n", 0U, hctx->dispatched[0]);
563 seq_printf(m, "%8u\t%lu\n", d, hctx->dispatched[i]);
566 seq_printf(m, "%8u+\t%lu\n", 1U << (i - 1), hctx->dispatched[i]);
573 struct blk_mq_hw_ctx *hctx = data;
577 hctx->dispatched[i] = 0;
583 struct blk_mq_hw_ctx *hctx = data;
585 seq_printf(m, "%lu\n", hctx->queued);
592 struct blk_mq_hw_ctx *hctx = data;
594 hctx->queued = 0;
600 struct blk_mq_hw_ctx *hctx = data;
602 seq_printf(m, "%lu\n", hctx->run);
609 struct blk_mq_hw_ctx *hctx = data;
611 hctx->run = 0;
617 struct blk_mq_hw_ctx *hctx = data;
619 seq_printf(m, "%d\n", atomic_read(&hctx->nr_active));
625 struct blk_mq_hw_ctx *hctx = data;
627 seq_printf(m, "%u\n", hctx->dispatch_busy);
829 struct blk_mq_hw_ctx *hctx;
843 queue_for_each_hw_ctx(q, hctx, i) {
844 if (!hctx->debugfs_dir)
845 blk_mq_debugfs_register_hctx(q, hctx);
846 if (q->elevator && !hctx->sched_debugfs_dir)
847 blk_mq_debugfs_register_sched_hctx(q, hctx);
865 static void blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx,
872 ctx_dir = debugfs_create_dir(name, hctx->debugfs_dir);
878 struct blk_mq_hw_ctx *hctx)
887 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num);
888 hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir);
890 debugfs_create_files(hctx->debugfs_dir, hctx, blk_mq_debugfs_hctx_attrs);
892 hctx_for_each_ctx(hctx, ctx, i)
893 blk_mq_debugfs_register_ctx(hctx, ctx);
896 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx)
898 debugfs_remove_recursive(hctx->debugfs_dir);
899 hctx->sched_debugfs_dir = NULL;
900 hctx->debugfs_dir = NULL;
905 struct blk_mq_hw_ctx *hctx;
908 queue_for_each_hw_ctx(q, hctx, i)
909 blk_mq_debugfs_register_hctx(q, hctx);
914 struct blk_mq_hw_ctx *hctx;
917 queue_for_each_hw_ctx(q, hctx, i)
918 blk_mq_debugfs_unregister_hctx(hctx);
977 struct blk_mq_hw_ctx *hctx)
984 hctx->sched_debugfs_dir = debugfs_create_dir("sched",
985 hctx->debugfs_dir);
986 debugfs_create_files(hctx->sched_debugfs_dir, hctx,
990 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx)
992 debugfs_remove_recursive(hctx->sched_debugfs_dir);
993 hctx->sched_debugfs_dir = NULL;