Lines Matching refs:m
17 static void print_stat(struct seq_file *m, struct blk_rq_stat *stat) in print_stat() argument
20 seq_printf(m, "samples=%d, mean=%llu, min=%llu, max=%llu", in print_stat()
23 seq_puts(m, "samples=0"); in print_stat()
27 static int queue_poll_stat_show(void *data, struct seq_file *m) in queue_poll_stat_show() argument
33 seq_printf(m, "read (%d Bytes): ", 1 << (9 + bucket)); in queue_poll_stat_show()
34 print_stat(m, &q->poll_stat[2 * bucket]); in queue_poll_stat_show()
35 seq_puts(m, "\n"); in queue_poll_stat_show()
37 seq_printf(m, "write (%d Bytes): ", 1 << (9 + bucket)); in queue_poll_stat_show()
38 print_stat(m, &q->poll_stat[2 * bucket + 1]); in queue_poll_stat_show()
39 seq_puts(m, "\n"); in queue_poll_stat_show()
44 static void *queue_requeue_list_start(struct seq_file *m, loff_t *pos) in queue_requeue_list_start() argument
47 struct request_queue *q = m->private; in queue_requeue_list_start()
53 static void *queue_requeue_list_next(struct seq_file *m, void *v, loff_t *pos) in queue_requeue_list_next() argument
55 struct request_queue *q = m->private; in queue_requeue_list_next()
60 static void queue_requeue_list_stop(struct seq_file *m, void *v) in queue_requeue_list_stop() argument
63 struct request_queue *q = m->private; in queue_requeue_list_stop()
75 static int blk_flags_show(struct seq_file *m, const unsigned long flags, in blk_flags_show() argument
85 seq_puts(m, "|"); in blk_flags_show()
88 seq_puts(m, flag_name[i]); in blk_flags_show()
90 seq_printf(m, "%d", i); in blk_flags_show()
95 static int queue_pm_only_show(void *data, struct seq_file *m) in queue_pm_only_show() argument
99 seq_printf(m, "%d\n", atomic_read(&q->pm_only)); in queue_pm_only_show()
137 static int queue_state_show(void *data, struct seq_file *m) in queue_state_show() argument
141 blk_flags_show(m, q->queue_flags, blk_queue_flag_name, in queue_state_show()
143 seq_puts(m, "\n"); in queue_state_show()
184 static int queue_write_hint_show(void *data, struct seq_file *m) in queue_write_hint_show() argument
190 seq_printf(m, "hint%d: %llu\n", i, q->write_hints[i]); in queue_write_hint_show()
226 static int hctx_state_show(void *data, struct seq_file *m) in hctx_state_show() argument
230 blk_flags_show(m, hctx->state, hctx_state_name, in hctx_state_show()
232 seq_puts(m, "\n"); in hctx_state_show()
254 static int hctx_flags_show(void *data, struct seq_file *m) in hctx_flags_show() argument
259 seq_puts(m, "alloc_policy="); in hctx_flags_show()
262 seq_puts(m, alloc_policy_name[alloc_policy]); in hctx_flags_show()
264 seq_printf(m, "%d", alloc_policy); in hctx_flags_show()
265 seq_puts(m, " "); in hctx_flags_show()
266 blk_flags_show(m, in hctx_flags_show()
269 seq_puts(m, "\n"); in hctx_flags_show()
329 int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq) in __blk_mq_debugfs_rq_show() argument
335 seq_printf(m, "%p {.op=", rq); in __blk_mq_debugfs_rq_show()
337 seq_printf(m, "%u", op); in __blk_mq_debugfs_rq_show()
339 seq_printf(m, "%s", op_str); in __blk_mq_debugfs_rq_show()
340 seq_puts(m, ", .cmd_flags="); in __blk_mq_debugfs_rq_show()
341 blk_flags_show(m, rq->cmd_flags & ~REQ_OP_MASK, cmd_flag_name, in __blk_mq_debugfs_rq_show()
343 seq_puts(m, ", .rq_flags="); in __blk_mq_debugfs_rq_show()
344 blk_flags_show(m, (__force unsigned int)rq->rq_flags, rqf_name, in __blk_mq_debugfs_rq_show()
346 seq_printf(m, ", .state=%s", blk_mq_rq_state_name(blk_mq_rq_state(rq))); in __blk_mq_debugfs_rq_show()
347 seq_printf(m, ", .tag=%d, .internal_tag=%d", rq->tag, in __blk_mq_debugfs_rq_show()
350 mq_ops->show_rq(m, rq); in __blk_mq_debugfs_rq_show()
351 seq_puts(m, "}\n"); in __blk_mq_debugfs_rq_show()
356 int blk_mq_debugfs_rq_show(struct seq_file *m, void *v) in blk_mq_debugfs_rq_show() argument
358 return __blk_mq_debugfs_rq_show(m, list_entry_rq(v)); in blk_mq_debugfs_rq_show()
362 static void *hctx_dispatch_start(struct seq_file *m, loff_t *pos) in hctx_dispatch_start() argument
365 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_start()
371 static void *hctx_dispatch_next(struct seq_file *m, void *v, loff_t *pos) in hctx_dispatch_next() argument
373 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_next()
378 static void hctx_dispatch_stop(struct seq_file *m, void *v) in hctx_dispatch_stop() argument
381 struct blk_mq_hw_ctx *hctx = m->private; in hctx_dispatch_stop()
394 struct seq_file *m; member
408 __blk_mq_debugfs_rq_show(params->m, rq); in hctx_show_busy_rq()
413 static int hctx_busy_show(void *data, struct seq_file *m) in hctx_busy_show() argument
416 struct show_busy_params params = { .m = m, .hctx = hctx }; in hctx_busy_show()
430 static int hctx_type_show(void *data, struct seq_file *m) in hctx_type_show() argument
435 seq_printf(m, "%s\n", hctx_types[hctx->type]); in hctx_type_show()
439 static int hctx_ctx_map_show(void *data, struct seq_file *m) in hctx_ctx_map_show() argument
443 sbitmap_bitmap_show(&hctx->ctx_map, m); in hctx_ctx_map_show()
447 static void blk_mq_debugfs_tags_show(struct seq_file *m, in blk_mq_debugfs_tags_show() argument
450 seq_printf(m, "nr_tags=%u\n", tags->nr_tags); in blk_mq_debugfs_tags_show()
451 seq_printf(m, "nr_reserved_tags=%u\n", tags->nr_reserved_tags); in blk_mq_debugfs_tags_show()
452 seq_printf(m, "active_queues=%d\n", in blk_mq_debugfs_tags_show()
455 seq_puts(m, "\nbitmap_tags:\n"); in blk_mq_debugfs_tags_show()
456 sbitmap_queue_show(tags->bitmap_tags, m); in blk_mq_debugfs_tags_show()
459 seq_puts(m, "\nbreserved_tags:\n"); in blk_mq_debugfs_tags_show()
460 sbitmap_queue_show(tags->breserved_tags, m); in blk_mq_debugfs_tags_show()
464 static int hctx_tags_show(void *data, struct seq_file *m) in hctx_tags_show() argument
474 blk_mq_debugfs_tags_show(m, hctx->tags); in hctx_tags_show()
481 static int hctx_tags_bitmap_show(void *data, struct seq_file *m) in hctx_tags_bitmap_show() argument
491 sbitmap_bitmap_show(&hctx->tags->bitmap_tags->sb, m); in hctx_tags_bitmap_show()
498 static int hctx_sched_tags_show(void *data, struct seq_file *m) in hctx_sched_tags_show() argument
508 blk_mq_debugfs_tags_show(m, hctx->sched_tags); in hctx_sched_tags_show()
515 static int hctx_sched_tags_bitmap_show(void *data, struct seq_file *m) in hctx_sched_tags_bitmap_show() argument
525 sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags->sb, m); in hctx_sched_tags_bitmap_show()
532 static int hctx_io_poll_show(void *data, struct seq_file *m) in hctx_io_poll_show() argument
536 seq_printf(m, "considered=%lu\n", hctx->poll_considered); in hctx_io_poll_show()
537 seq_printf(m, "invoked=%lu\n", hctx->poll_invoked); in hctx_io_poll_show()
538 seq_printf(m, "success=%lu\n", hctx->poll_success); in hctx_io_poll_show()
551 static int hctx_dispatched_show(void *data, struct seq_file *m) in hctx_dispatched_show() argument
556 seq_printf(m, "%8u\t%lu\n", 0U, hctx->dispatched[0]); in hctx_dispatched_show()
561 seq_printf(m, "%8u\t%lu\n", d, hctx->dispatched[i]); in hctx_dispatched_show()
564 seq_printf(m, "%8u+\t%lu\n", 1U << (i - 1), hctx->dispatched[i]); in hctx_dispatched_show()
579 static int hctx_queued_show(void *data, struct seq_file *m) in hctx_queued_show() argument
583 seq_printf(m, "%lu\n", hctx->queued); in hctx_queued_show()
596 static int hctx_run_show(void *data, struct seq_file *m) in hctx_run_show() argument
600 seq_printf(m, "%lu\n", hctx->run); in hctx_run_show()
613 static int hctx_active_show(void *data, struct seq_file *m) in hctx_active_show() argument
617 seq_printf(m, "%d\n", atomic_read(&hctx->nr_active)); in hctx_active_show()
621 static int hctx_dispatch_busy_show(void *data, struct seq_file *m) in hctx_dispatch_busy_show() argument
625 seq_printf(m, "%u\n", hctx->dispatch_busy); in hctx_dispatch_busy_show()
630 static void *ctx_##name##_rq_list_start(struct seq_file *m, loff_t *pos) \
633 struct blk_mq_ctx *ctx = m->private; \
639 static void *ctx_##name##_rq_list_next(struct seq_file *m, void *v, \
642 struct blk_mq_ctx *ctx = m->private; \
647 static void ctx_##name##_rq_list_stop(struct seq_file *m, void *v) \
650 struct blk_mq_ctx *ctx = m->private; \
666 static int ctx_dispatched_show(void *data, struct seq_file *m) in ctx_dispatched_show() argument
670 seq_printf(m, "%lu %lu\n", ctx->rq_dispatched[1], ctx->rq_dispatched[0]); in ctx_dispatched_show()
683 static int ctx_merged_show(void *data, struct seq_file *m) in ctx_merged_show() argument
687 seq_printf(m, "%lu\n", ctx->rq_merged); in ctx_merged_show()
700 static int ctx_completed_show(void *data, struct seq_file *m) in ctx_completed_show() argument
704 seq_printf(m, "%lu %lu\n", ctx->rq_completed[1], ctx->rq_completed[0]); in ctx_completed_show()
717 static int blk_mq_debugfs_show(struct seq_file *m, void *v) in blk_mq_debugfs_show() argument
719 const struct blk_mq_debugfs_attr *attr = m->private; in blk_mq_debugfs_show()
720 void *data = d_inode(m->file->f_path.dentry->d_parent)->i_private; in blk_mq_debugfs_show()
722 return attr->show(data, m); in blk_mq_debugfs_show()
728 struct seq_file *m = file->private_data; in blk_mq_debugfs_write() local
729 const struct blk_mq_debugfs_attr *attr = m->private; in blk_mq_debugfs_write()
746 struct seq_file *m; in blk_mq_debugfs_open() local
752 m = file->private_data; in blk_mq_debugfs_open()
753 m->private = data; in blk_mq_debugfs_open()