lkml.org 
[lkml]   [2013]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 5/5] blk-mq: Lower minimum queue depth from 4 to 1
There is no reason to limit minimum queue depth.
Indeed, some ATA devices ask for the depth of 1.

Signed-off-by: Alexander Gordeev <agordeev@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
agordeev@redhat.com


\
 
 \ /
  Last update: 2013-08-21 17:41    [W:0.550 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site