From: Jens Axboe <axboe@kernel.dk>
To: tj@kernel.org, josef@toxicpanda.com, linan666@huaweicloud.com
Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, linan122@huawei.com,
yukuai3@huawei.com, yi.zhang@huawei.com, houtao1@huawei.com,
yangerkun@huawei.com
Subject: Re: [PATCH] blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost
Date: Mon, 05 Jun 2023 12:09:00 -0600 [thread overview]
Message-ID: <168598854044.127564.8532399641861277056.b4-ty@kernel.dk> (raw)
In-Reply-To: <20230527091904.3001833-1-linan666@huaweicloud.com>
On Sat, 27 May 2023 17:19:04 +0800, linan666@huaweicloud.com wrote:
> adjust_inuse_and_calc_cost() use spin_lock_irq() and IRQ will be enabled
> when unlock. DEADLOCK might happen if we have held other locks and disabled
> IRQ before invoking it.
>
> Fix it by using spin_lock_irqsave() instead, which can keep IRQ state
> consistent with before when unlock.
>
> [...]
Applied, thanks!
[1/1] blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost
commit: 8d211554679d0b23702bd32ba04aeac0c1c4f660
Best regards,
--
Jens Axboe
prev parent reply other threads:[~2023-06-05 18:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 9:19 [PATCH] blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost linan666
2023-05-29 13:04 ` Yu Kuai
2023-06-05 18:04 ` Tejun Heo
2023-06-05 18:09 ` 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=168598854044.127564.8532399641861277056.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=houtao1@huawei.com \
--cc=josef@toxicpanda.com \
--cc=linan122@huawei.com \
--cc=linan666@huaweicloud.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.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