There is no reason to limit minimum queue depth.
Indeed, some ATA devices ask for the depth of 1.

Signed-off-by: Alexander Gordeev <agord...@redhat.com>
---
 block/blk-mq-tag.c |    2 +-
 block/blk-mq-tag.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index e74e18e..a115862 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -456,7 +456,7 @@ struct blk_mq_tags *blk_mq_init_tags(unsigned int 
total_tags,
        tags->nr_tags = total_tags;
        tags->reserved_tags = reserved_tags;
        tags->max_cache = nr_cache;
-       tags->batch_move = nr_cache / 2;
+       tags->batch_move = max(1u, nr_cache / 2);
 
        /*
         * Reserved tags are first
diff --git a/block/blk-mq-tag.h b/block/blk-mq-tag.h
index 716ea79..947ba2c 100644
--- a/block/blk-mq-tag.h
+++ b/block/blk-mq-tag.h
@@ -14,7 +14,7 @@ extern bool blk_mq_has_free_tags(struct blk_mq_tags *tags);
 extern ssize_t blk_mq_tag_sysfs_show(struct blk_mq_tags *tags, char *page);
 
 enum {
-       BLK_MQ_TAG_CACHE_MIN    = 4,
+       BLK_MQ_TAG_CACHE_MIN    = 1,
        BLK_MQ_TAG_CACHE_MAX    = 64,
 };
 
-- 
1.7.7.6

-- 
Regards,
Alexander Gordeev
agord...@redhat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to