On 3/22/21 8:53 AM, Pavel Begunkov wrote: > On 22/03/2021 13:45, Jens Axboe wrote: >> On 3/21/21 7:58 PM, Pavel Begunkov wrote: >>> io_run_task_work() does some extra work for safety, that isn't actually >>> needed in many cases, particularly when it's known that current is not >>> exiting and in the TASK_RUNNING state, like in the beginning of a >>> syscall. >> >> Is this really worth it? > > Not alone, but ifs tend to pile up, and I may argue that PF_EXITING in > the beginning of a syscall may be confusing. Are you afraid it will get > out of sync with time? Not really worried about it, just don't like that we end up with two functions for running the task_work, where one has a check the other one does not. -- Jens Axboe