[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aA4wROulY-gMJFqS@fedora>
Date: Sun, 27 Apr 2025 21:25:24 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: Jens Axboe <axboe@...nel.dk>, Uday Shankar <ushankar@...estorage.com>,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] ublk: store request pointer in ublk_io
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@...hat.com>
> Signed-off-by: Caleb Sander Mateos <csander@...estorage.com>
Reviewed-by: Ming Lei <ming.lei@...hat.com>
thanks,
Ming
Powered by blists - more mailing lists