• Jens Axboe's avatar
    io_uring/napi: ensure napi polling is aborted when work is available · 428f1382
    Jens Axboe authored
    While testing io_uring NAPI with DEFER_TASKRUN, I ran into slowdowns and
    stalls in packet delivery. Turns out that while
    io_napi_busy_loop_should_end() aborts appropriately on regular
    task_work, it does not abort if we have local task_work pending.
    
    Move io_has_work() into the private io_uring.h header, and gate whether
    we should continue polling on that as well. This makes NAPI polling on
    send/receive work as designed with IORING_SETUP_DEFER_TASKRUN as well.
    
    Fixes: 8d0c12a8 ("io-uring: add napi busy poll support")
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    428f1382
io_uring.h 12.9 KB