[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzX4brqWfvoa/ErM@kbusch-mbp.dhcp.thefacebook.com>
Date: Thu, 29 Sep 2022 13:56:30 -0600
From: Keith Busch <kbusch@...nel.org>
To: Hugh Dickins <hughd@...gle.com>
Cc: Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Yu Kuai <yukuai1@...weicloud.com>,
Liu Song <liusong@...ux.alibaba.com>,
Hillf Danton <hdanton@...a.com>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH next v3] sbitmap: fix lockup while swapping
On Thu, Sep 29, 2022 at 12:50:12PM -0700, Hugh Dickins wrote:
> @@ -587,7 +587,7 @@ static struct sbq_wait_state *sbq_wake_p
> for (i = 0; i < SBQ_WAIT_QUEUES; i++) {
> struct sbq_wait_state *ws = &sbq->ws[wake_index];
>
> - if (waitqueue_active(&ws->wait)) {
> + if (waitqueue_active(&ws->wait) && atomic_read(&ws->wait_cnt)) {
> if (wake_index != atomic_read(&sbq->wake_index))
> atomic_set(&sbq->wake_index, wake_index);
> return ws;
This change makes sense and looks good. Thanks for the follow up.
Reviewed-by: Keith Busch <kbusch@...nel.org>
Powered by blists - more mailing lists