aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/elevator.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2017-05-04 08:24:40 -0600
committerJens Axboe <axboe@fb.com>2017-05-04 08:24:40 -0600
commitd332ce091813d11a46144354baa72b755833392f (patch)
treec6f567b7ffea6dc4abf66cd49e2f94d7a9a49410 /include/linux/elevator.h
parentblk-mq: untangle debugfs and sysfs (diff)
downloadwireguard-linux-d332ce091813d11a46144354baa72b755833392f.tar.xz
wireguard-linux-d332ce091813d11a46144354baa72b755833392f.zip
blk-mq-debugfs: allow schedulers to register debugfs attributes
This provides the infrastructure for schedulers to expose their internal state through debugfs. We add a list of queue attributes and a list of hctx attributes to struct elevator_type and wire them up when switching schedulers. Signed-off-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Add missing seq_file.h header in blk-mq-debugfs.h Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r--include/linux/elevator.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index d44840368ee7..9ec5e22846e0 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -8,6 +8,9 @@
struct io_cq;
struct elevator_type;
+#ifdef CONFIG_BLK_DEBUG_FS
+struct blk_mq_debugfs_attr;
+#endif
/*
* Return values from elevator merger
@@ -144,6 +147,10 @@ struct elevator_type
char elevator_name[ELV_NAME_MAX];
struct module *elevator_owner;
bool uses_mq;
+#ifdef CONFIG_BLK_DEBUG_FS
+ const struct blk_mq_debugfs_attr *queue_debugfs_attrs;
+ const struct blk_mq_debugfs_attr *hctx_debugfs_attrs;
+#endif
/* managed by elevator core */
char icq_cache_name[ELV_NAME_MAX + 5]; /* elvname + "_io_cq" */