Linux block layer
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: jack@suse.cz, qiulaibin@huawei.com,
	andriy.shevchenko@linux.intel.com,
	Yu Kuai <yukuai1@huaweicloud.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH -next v2] blk-mq: fix potential io hang by wrong 'wake_batch'
Date: Mon, 12 Jun 2023 09:56:26 -0600	[thread overview]
Message-ID: <168658538673.969588.639148205003839147.b4-ty@kernel.dk> (raw)
In-Reply-To: <20230610023043.2559121-1-yukuai1@huaweicloud.com>


On Sat, 10 Jun 2023 10:30:43 +0800, Yu Kuai wrote:
> In __blk_mq_tag_busy/idle(), updating 'active_queues' and calculating
> 'wake_batch' is not atomic:
> 
> t1:			t2:
> _blk_mq_tag_busy	blk_mq_tag_busy
> inc active_queues
> // assume 1->2
> 			inc active_queues
> 			// 2 -> 3
> 			blk_mq_update_wake_batch
> 			// calculate based on 3
> blk_mq_update_wake_batch
> /* calculate based on 2, while active_queues is actually 3. */
> 
> [...]

Applied, thanks!

[1/1] blk-mq: fix potential io hang by wrong 'wake_batch'
      commit: 4f1731df60f9033669f024d06ae26a6301260b55

Best regards,
-- 
Jens Axboe




      parent reply	other threads:[~2023-06-12 15:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-10  2:30 [PATCH -next v2] blk-mq: fix potential io hang by wrong 'wake_batch' Yu Kuai
2023-06-12  8:24 ` Jan Kara
2023-06-12 15:56 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=168658538673.969588.639148205003839147.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qiulaibin@huawei.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox