[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZH4jya9ksKbHEf7s@slm.duckdns.org>
Date: Mon, 5 Jun 2023 08:04:57 -1000
From: Tejun Heo <tj@...nel.org>
To: linan666@...weicloud.com
Cc: josef@...icpanda.com, axboe@...nel.dk, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linan122@...wei.com, yukuai3@...wei.com, yi.zhang@...wei.com,
houtao1@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH] blk-iocost: use spin_lock_irqsave in
adjust_inuse_and_calc_cost
On Sat, May 27, 2023 at 05:19:04PM +0800, linan666@...weicloud.com wrote:
> From: Li Nan <linan122@...wei.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@...wei.com>
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
Powered by blists - more mailing lists