Skip to content

Commit a3c9256

Browse files
Algodev-githubaxboe
authored andcommitted
block, bfq: reduce threshold for detecting command queueing
bfq simple heuristic from cfq for detecting whether the drive performs command queueing: check whether the average number of in-flight requests is above a given threshold. Unfortunately this heuristic does fail to detect queueing (on drives with queueing) if processes doing I/O are few and issue I/O with a low depth. To reduce false negatives, this commit lowers the threshold. Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 9dee8b3 commit a3c9256

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎block/bfq-iosched.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static struct kmem_cache *bfq_pool;
230230
#define BFQ_MIN_TT (2 * NSEC_PER_MSEC)
231231

232232
/* hw_tag detection: parallel requests threshold and min samples needed. */
233-
#define BFQ_HW_QUEUE_THRESHOLD 4
233+
#define BFQ_HW_QUEUE_THRESHOLD 3
234234
#define BFQ_HW_QUEUE_SAMPLES 32
235235

236236
#define BFQQ_SEEK_THR (sector_t)(8 * 100)
@@ -4798,7 +4798,7 @@ static void bfq_update_hw_tag(struct bfq_data *bfqd)
47984798
* sum is not exact, as it's not taking into account deactivated
47994799
* requests.
48004800
*/
4801-
if (bfqd->rq_in_driver + bfqd->queued < BFQ_HW_QUEUE_THRESHOLD)
4801+
if (bfqd->rq_in_driver + bfqd->queued <= BFQ_HW_QUEUE_THRESHOLD)
48024802
return;
48034803

48044804
if (bfqd->hw_tag_samples++ < BFQ_HW_QUEUE_SAMPLES)

0 commit comments

Comments
 (0)