• Jens Axboe's avatar
    io_uring/sqpoll: manage task_work privately · af5d68f8
    Jens Axboe authored
    Decouple from task_work running, and cap the number of entries we process
    at the time. If we exceed that number, push remaining entries to a retry
    list that we'll process first next time.
    
    We cap the number of entries to process at 8, which is fairly random.
    We just want to get enough per-ctx batching here, while not processing
    endlessly.
    
    Since we manually run PF_IO_WORKER related task_work anyway as the task
    never exits to userspace, with this we no longer need to add an actual
    task_work item to the per-process list.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    af5d68f8
io_uring.h 12 KB