This whole series seems to miss a linux-block cc.. On Wed, Dec 15, 2021 at 09:24:18AM -0700, Jens Axboe wrote: > If we have a list of requests in our plug list, send it to the driver in > one go, if possible. The driver must set mq_ops->queue_rqs() to support > this, if not the usual one-by-one path is used. > > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> > --- > block/blk-mq.c | 26 +++++++++++++++++++++++--- > include/linux/blk-mq.h | 8 ++++++++ > 2 files changed, 31 insertions(+), 3 deletions(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index e02e7017db03..f24394cb2004 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -2512,6 +2512,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule) > { > struct blk_mq_hw_ctx *this_hctx; > struct blk_mq_ctx *this_ctx; > + struct request *rq; > unsigned int depth; > LIST_HEAD(list); > > @@ -2520,7 +2521,28 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule) > plug->rq_count = 0; > > if (!plug->multiple_queues && !plug->has_elevator && !from_schedule) { > + struct request_queue *q; > + > + rq = rq_list_peek(&plug->mq_list); > + q = rq->q; Nit: I'd just drop the q local variable as it is rather pointless. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>