On 04/08, Jens Axboe wrote: > > So the question remains, we basically have this: > > A B > task_work_run(tsk) > task_work_add(tsk, io_poll_task_func()) > process cbs > wait_for_completion() > > with the last wait needing to flush the work added on the B side, since > that isn't part of the initial list. I don't understand you, even remotely :/ maybe you can write some pseudo-code ? who does wait_for_completion(), a callback? or this "tsk" after it does task_work_run() ? Who does complete() ? How can this wait_for_completion() help to flush the work added on the B side? And why do you need to do something special to flush that work? Could you also explain the comment above task_work_add() in __io_async_wake() ? If this fails, then the task is exiting. OK, If that is the case, then the exit check which exit check? will ultimately cancel these work items. what does this mean? there is nothing to cancel if task_work_add() fails, I guess this means something else... Oleg.