On Sat, Apr 26, 2025 at 10:58:03PM -0600, Caleb Sander Mateos wrote: > A ublk_io is converted to a request in several places in the I/O path by > looking up the (qid, tag) on the ublk device's tagset. This involves a > bunch of pointer dereferences and a bounds check of the tag. > > To make this conversion cheaper, store the request pointer in ublk_io. > Overlap this storage with the io_uring_cmd pointer. This is safe because > the io_uring_cmd pointer is only valid if UBLK_IO_FLAG_ACTIVE is set on > the ublk_io, the request pointer is valid if UBLK_IO_FLAG_OWNED_BY_SRV, > and these flags are mutually exclusive. Yeah, it becomes exclusive after UBLK_IO_NEED_GET_DATA is cleaned as one sync command. > > Suggested-by: Ming Lei <ming.lei@xxxxxxxxxx> > Signed-off-by: Caleb Sander Mateos <csander@xxxxxxxxxxxxxxx> Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx> thanks, Ming