[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZjnzZhcOQ/xVDU3e@gmail.com>
Date: Tue, 7 May 2024 02:24:54 -0700
From: Breno Leitao <leitao@...ian.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Pavel Begunkov <asml.silence@...il.com>, leit@...a.com,
"open list:IO_URING" <io-uring@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] io_uring/io-wq: Use set_bit() and test_bit() at
worker->flags
Hello Jens,
On Fri, May 03, 2024 at 12:41:38PM -0600, Jens Axboe wrote:
> On 5/3/24 11:37 AM, Breno Leitao wrote:
> > @@ -631,7 +631,8 @@ static int io_wq_worker(void *data)
> > bool exit_mask = false, last_timeout = false;
> > char buf[TASK_COMM_LEN];
> >
> > - worker->flags |= (IO_WORKER_F_UP | IO_WORKER_F_RUNNING);
> > + set_bit(IO_WORKER_F_UP, &worker->flags);
> > + set_bit(IO_WORKER_F_RUNNING, &worker->flags);
>
> You could probably just use WRITE_ONCE() here with the mask, as it's
> setup side.
Nice, I didn't know we could mix and match regular operations and
set_bits(). Digging a bit further, I got that this is possible.
Thanks for the feedback.
Powered by blists - more mailing lists