You need to sign in or sign up before continuing.
  • Jens Axboe's avatar
    io_uring/kbuf: flag request if buffer pool is empty after buffer pick · c3f9109d
    Jens Axboe authored
    
    
    Normally we do an extra roundtrip for retries even if the buffer pool has
    depleted, as we don't check that upfront. Rather than add this check, have
    the buffer selection methods mark the request with REQ_F_BL_EMPTY if the
    used buffer group is out of buffers after this selection. This is very
    cheap to do once we're all the way inside there anyway, and it gives the
    caller a chance to make better decisions on how to proceed.
    
    For example, recv/recvmsg multishot could check this flag when it
    decides whether to keep receiving or not.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    c3f9109d
kbuf.c 19.5 KB