[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMZfGtUXq=nQyijktRaP7xp=sAmVCryTjU4Jo5Z=ufed8arnKQ@mail.gmail.com>
Date: Tue, 26 Oct 2021 18:32:38 +0800
From: Muchun Song <songmuchun@...edance.com>
To: Zqiang <qiang.zhang1211@...il.com>
Cc: Jens Axboe <axboe@...nel.dk>, asml.silence@...il.com,
io-uring@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] io-wq: Remove unnecessary rcu_read_lock/unlock() in raw
spinlock critical section
On Tue, Oct 26, 2021 at 11:23 AM Zqiang <qiang.zhang1211@...il.com> wrote:
>
> Due to raw_spin_lock/unlock() contains preempt_disable/enable() action,
> already regarded as RCU critical region, so remove unnecessary
> rcu_read_lock/unlock().
>
> Signed-off-by: Zqiang <qiang.zhang1211@...il.com>
> ---
> fs/io-wq.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/io-wq.c b/fs/io-wq.c
> index cd88602e2e81..401be005d089 100644
> --- a/fs/io-wq.c
> +++ b/fs/io-wq.c
> @@ -855,9 +855,7 @@ static void io_wqe_enqueue(struct io_wqe *wqe, struct io_wq_work *work)
> io_wqe_insert_work(wqe, work);
> clear_bit(IO_ACCT_STALLED_BIT, &acct->flags);
>
> - rcu_read_lock();
Add a comment like:
/* spin_lock can serve as an RCU read-side critical section. */
With that.
Reviewed-by: Muchun Song <songmuchun@...edance.com>
Thanks.
> do_create = !io_wqe_activate_free_worker(wqe, acct);
> - rcu_read_unlock();
>
> raw_spin_unlock(&wqe->lock);
>
> --
> 2.17.1
>
Powered by blists - more mailing lists