• Jens Axboe's avatar
    io_uring: use hash table for poll command lookups · 78076bb6
    Jens Axboe authored
    We recently changed this from a single list to an rbtree, but for some
    real life workloads, the rbtree slows down the submission/insertion
    case enough so that it's the top cycle consumer on the io_uring side.
    In testing, using a hash table is a more well rounded compromise. It
    is fast for insertion, and as long as it's sized appropriately, it
    works well for the cancellation case as well. Running TAO with a lot
    of network sockets, this removes io_poll_req_insert() from spending
    2% of the CPU cycles.
    Reported-by: default avatarDan Melnic <dmm@fb.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    78076bb6
io_uring.c 125 KB