Hi, On Wed, May 13, 2020 at 2:55 AM Ming Lei <ming.lei@xxxxxxxxxx> wrote: > > blk-mq budget is abstract from scsi's device queue depth, and it is > always per-request-queue instead of hctx. > > It can be quite absurd to get a budget from one hctx, then dequeue a > request from scheduler queue, and this request may not belong to this > hctx, at least for bfq and deadline. > > So fix the mess and always pass request queue to get/put budget > callback. > > Cc: Sagi Grimberg <sagi@xxxxxxxxxxx> > Cc: Baolin Wang <baolin.wang7@xxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx> > Cc: Douglas Anderson <dianders@xxxxxxxxxxxx> > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> > --- > block/blk-mq-sched.c | 8 ++++---- > block/blk-mq.c | 8 ++++---- > block/blk-mq.h | 12 ++++-------- > drivers/scsi/scsi_lib.c | 8 +++----- > include/linux/blk-mq.h | 4 ++-- > 5 files changed, 17 insertions(+), 23 deletions(-) Seems sane to me and probably would have helped me understand this code a little faster in the past. ;-) Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>