From: Tejun Heo <tj@kernel.org>
To: linan666@huaweicloud.com
Cc: josef@toxicpanda.com, axboe@kernel.dk, 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, 5 Jun 2023 08:04:57 -1000 [thread overview]
Message-ID: <ZH4jya9ksKbHEf7s@slm.duckdns.org> (raw)
In-Reply-To: <20230527091904.3001833-1-linan666@huaweicloud.com>
On Sat, May 27, 2023 at 05:19:04PM +0800, linan666@huaweicloud.com wrote:
> From: Li Nan <linan122@huawei.com>
>
> 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.
...
> Fixes: b0853ab4a238 ("blk-iocost: revamp in-period donation snapbacks")
> Signed-off-by: Li Nan <linan122@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
next prev parent reply other threads:[~2023-06-05 18:06 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 [this message]
2023-06-05 18:09 ` Jens Axboe
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=ZH4jya9ksKbHEf7s@slm.duckdns.org \
--to=tj@kernel.org \
--cc=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=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