[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ddb3c319-65f3-6045-d0ac-764c7dcc84c2@huawei.com>
Date: Wed, 5 Jan 2022 10:56:25 +0000
From: John Garry <john.garry@...wei.com>
To: Laibin Qiu <qiulaibin@...wei.com>, <axboe@...nel.dk>,
<ming.lei@...hat.com>
CC: <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next V2] blk-mq: fix tag_get wait task can't be awakened
On 05/01/2022 03:56, Laibin Qiu wrote:
> +
> /*
> * If a previously inactive queue goes active, bump the active user count.
> * We need to do this before try to allocate driver tag, then even if fail
> @@ -23,10 +38,16 @@
> */
> bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx)
> {
> + unsigned int users;
> +
> if (!test_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state) &&
> - !test_and_set_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state))
> + !test_and_set_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state)) {
> atomic_inc(&hctx->tags->active_queues);
>
> + users = atomic_read(&hctx->tags->active_queues);
> + blk_mq_update_wake_batch(hctx->tags, users);
> + }
> +
> return true;
> }
>
This code looks old to me. Which baseline is used here?
Thanks,
John
Powered by blists - more mailing lists