On 6/9/20 10:44 AM, Pavel Begunkov wrote: > On 09/06/2020 11:25, Xiaoguang Wang wrote: >> If requests can be submitted and completed inline, we don't need to >> initialize whole io_wq_work in io_init_req(), which is an expensive >> operation, add a new 'REQ_F_WORK_INITIALIZED' to control whether >> io_wq_work is initialized. > > Basically it's "call io_req_init_async() before touching ->work" now. > This shouldn't be as easy to screw as was with ->func. > > The only thing left that I don't like _too_ much to stop complaining > is ->creds handling. But this one should be easy, see incremental diff > below (not tested). If custom creds are provided, it initialises > req->work in req_init() and sets work.creds. And then we can remove > req->creds. > > What do you think? Custom ->creds (aka personality) is a niche feature, > and the speedup is not so great to care. Thanks for reviewing, I agree. Xiaoguang, care to fold in that change and then I think we're good to shove this in. -- Jens Axboe