]> www.infradead.org Git - users/jedix/linux-maple.git/commit
block/mq-deadline: Fix the tag reservation code
authorBart Van Assche <bvanassche@acm.org>
Thu, 9 May 2024 17:01:49 +0000 (10:01 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Jul 2024 14:47:45 +0000 (08:47 -0600)
commit39823b47bbd40502632ffba90ebb34fff7c8b5e8
treec35fbb19ce7683ca9822f8108bdd0d9942a88422
parent6259151c04d4e0085e00d2dcb471ebdd1778e72e
block/mq-deadline: Fix the tag reservation code

The current tag reservation code is based on a misunderstanding of the
meaning of data->shallow_depth. Fix the tag reservation code as follows:
* By default, do not reserve any tags for synchronous requests because
  for certain use cases reserving tags reduces performance. See also
  Harshit Mogalapalli, [bug-report] Performance regression with fio
  sequential-write on a multipath setup, 2024-03-07
  (https://lore.kernel.org/linux-block/5ce2ae5d-61e2-4ede-ad55-551112602401@oracle.com/)
* Reduce min_shallow_depth to one because min_shallow_depth must be less
  than or equal any shallow_depth value.
* Scale dd->async_depth from the range [1, nr_requests] to [1,
  bits_per_sbitmap_word].

Cc: Christoph Hellwig <hch@lst.de>
Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: Zhiguo Niu <zhiguo.niu@unisoc.com>
Fixes: 07757588e507 ("block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240509170149.7639-3-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/mq-deadline.c