Re: [PATCH 8/8] ublk: store request pointer in ublk_io

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux