• P
    io_uring: don't burn CPU for iopoll on exit · b2edc0a7
    Pavel Begunkov 提交于
    First of all don't spin in io_ring_ctx_wait_and_kill() on iopoll.
    Requests won't complete faster because of that, but only lengthen
    io_uring_release().
    
    The same goes for offloaded cleanup in io_ring_exit_work() -- it
    already has waiting loop, don't do blocking active spinning.
    
    For that, pass min=0 into io_iopoll_[try_]reap_events(), so it won't
    actively spin. Leave the function if io_do_iopoll() there can't
    complete a request to sleep in io_ring_exit_work().
    Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    b2edc0a7
io_uring.c 202.0 KB