]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nvme: Add ctrl attributes for queue_count and sqsize
authorJames Smart <jsmart2021@gmail.com>
Tue, 24 Sep 2019 21:22:08 +0000 (14:22 -0700)
committerSagi Grimberg <sagi@grimberg.me>
Wed, 25 Sep 2019 20:01:44 +0000 (13:01 -0700)
Current controller interrogation requires a lot of guesswork
on how many io queues were created and what the io sq size is.
The numbers are dependent upon core/fabric defaults, connect
arguments, and target responses.

Add sysfs attributes for queue_count and sqsize.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c

index 87ed437a46b84ac4c47ee9adbc26a945c797b711..fd7dea36c3b6832c31aa63ba74b1bb68fa09a376 100644 (file)
@@ -3135,6 +3135,8 @@ static DEVICE_ATTR(field, S_IRUGO, field##_show, NULL);
 
 nvme_show_int_function(cntlid);
 nvme_show_int_function(numa_node);
+nvme_show_int_function(queue_count);
+nvme_show_int_function(sqsize);
 
 static ssize_t nvme_sysfs_delete(struct device *dev,
                                struct device_attribute *attr, const char *buf,
@@ -3215,6 +3217,8 @@ static struct attribute *nvme_dev_attrs[] = {
        &dev_attr_address.attr,
        &dev_attr_state.attr,
        &dev_attr_numa_node.attr,
+       &dev_attr_queue_count.attr,
+       &dev_attr_sqsize.attr,
        NULL
 };