[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 8 Aug 2018 17:24:12 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Jianchao Wang <jianchao.w.wang@...cle.com>
Cc: Jens Axboe <axboe@...nel.dk>,
linux-block <linux-block@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] blk-mq: count the hctx as active before allocate tag
On Wed, Aug 8, 2018 at 4:22 PM, Jianchao Wang
<jianchao.w.wang@...cle.com> wrote:
> Currently, we count the hctx as active after allocate tag
> successfully. The other shared-tags users could exhaust the tags
> and starve a non-active and waiting-tag hctx. Count the hctx as
> active before try to allocate tag to fix this.
This patch looks fine.
>
> Signed-off-by: Jianchao Wang <jianchao.w.wang@...cle.com>
> ---
> block/blk-mq.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index ae44e85..acd40eb 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -369,6 +369,8 @@ static struct request *blk_mq_get_request(struct request_queue *q,
> e->type->ops.mq.limit_depth(op, data);
> }
>
> + blk_mq_tag_busy(data.hctx);
> +
blk_mq_tag_busy is only required for driver tag.
Thanks,
Ming Lei
Powered by blists - more mailing lists