On 10/30/24 02:43, Jens Axboe wrote:
On 10/29/24 8:03 PM, Ming Lei wrote:
On Tue, Oct 29, 2024 at 03:26:37PM -0600, Jens Axboe wrote:
On 10/29/24 2:06 PM, Jens Axboe wrote:
On 10/29/24 1:18 PM, Jens Axboe wrote:
...
+ node->buf = imu;
+ node->kbuf_fn = kbuf_fn;
+ return node;
Also this function needs to register the buffer to table with one
pre-defined buf index, then the following request can use it by
the way of io_prep_rw_fixed().
It should not register it with the table, the whole point is to keep
this node only per-submission discoverable. If you're grabbing random
request pages, then it very much is a bit finicky
Registering it into the table has enough of design and flexibility
merits: error handling, allowing any type of dependencies of requests
by handling it in the user space, etc.
and needs to be of
limited scope.
And I don't think we can force it, neither with limiting exposure to
submission only nor with the Ming's group based approach. The user can
always queue a request that will never complete and/or by using
DEFER_TASKRUN and just not letting it run. In this sense it might be
dangerous to block requests of an average system shared block device,
but if it's fine with ublk it sounds like it should be fine for any of
the aforementioned approaches.
Each request type would need to support it. For normal read/write, I'd
suggest just adding IORING_OP_READ_LOCAL and WRITE_LOCAL to do that.
--
Pavel Begunkov