On 6/12/23 10:57 AM, Linus Torvalds wrote: > On Mon, Jun 12, 2023 at 9:45 AM Jens Axboe <axboe@xxxxxxxxx> wrote: >> >> You snipped the suspicion in my reply on why that exists, to avoid >> io_wq_worker_sleeping() triggering. > > I'm not seeing why triggering io_wq_worker_sleeping() should even be a > problem in the first place. > > I suspect that is entirely historical too, and has to do with how it > used to do that > > struct io_worker *worker = kthread_data(tsk); > struct io_wqe *wqe = worker->wqe; > > back in the bad old days of kthreads. > > But yeah, I don't know that code. Looks fine to me to just kill it indeed, whatever we did need this for is definitely no longer the case. I _think_ we used to have something in the worker exit that would potentially sleep which is why we killed it before doing that, now it just looks like dead code. -- Jens Axboe