• Jens Axboe's avatar
    io_uring/rw: always setup io_async_rw for read/write requests · a9165b83
    Jens Axboe authored
    read/write requests try to put everything on the stack, and then alloc
    and copy if a retry is needed. This necessitates a bunch of nasty code
    that deals with intermediate state.
    
    Get rid of this, and have the prep side setup everything that is needed
    upfront, which greatly simplifies the opcode handlers.
    
    This includes adding an alloc cache for io_async_rw, to make it cheap
    to handle.
    
    In terms of cost, this should be basically free and transparent. For
    the worst case of {READ,WRITE}_FIXED which didn't need it before,
    performance is unaffected in the normal peak workload that is being
    used to test that. Still runs at 122M IOPS.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    a9165b83
io_uring.c 108 KB