Thread (37 messages) 37 messages, 5 authors, 2019-01-10

Re: [PATCH 14/16] io_uring: support kernel side submission

flat view

From: Jens Axboe <axboe@kernel.dk>
Date: 2019-01-09 20:49:01
Also in: linux-arch, linux-fsdevel

On 1/9/19 12:06 PM, Christoph Hellwig wrote:
quoted
+struct iocb_submit {
+	const struct io_uring_iocb *iocb;
+	unsigned int index;
+};
+
+struct io_work {
+	struct work_struct work;
+	struct io_ring_ctx *ctx;
+	struct io_uring_iocb iocb;
+	unsigned iocb_index;
+};
I think we should use struct iocb_submit everywhere where we pass
an iocb + index, including in the io_work structure.  Here is how
I did that to my old tree:

http://git.infradead.org/users/hch/misc.git/commitdiff/65929ed6f143a1c996305a10a15fd7f64d32595f
I like that unification.
Btw, I think we can also remove the separate io_work allocation,
just do the io_get_req in the submission context, and overlay
the io_work onto the iocb in a union of some sort.  This avoids
a whole memory allocation.
I'll take a look at that.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help