Commit a4f8d94c authored by Jens Axboe's avatar Jens Axboe

io_uring: move provided and fixed buffers into the same io_kiocb area

These are mutually exclusive - if you use provided buffers, then you
cannot use fixed buffers and vice versa. Move them into the same spot
in the io_kiocb, which is also advantageous for provided buffers as
they get near the submit side hot cacheline.
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 149c69b0
...@@ -958,8 +958,14 @@ struct io_kiocb { ...@@ -958,8 +958,14 @@ struct io_kiocb {
struct task_struct *task; struct task_struct *task;
struct io_rsrc_node *rsrc_node; struct io_rsrc_node *rsrc_node;
/* store used ubuf, so we can prevent reloading */
struct io_mapped_ubuf *imu; union {
/* store used ubuf, so we can prevent reloading */
struct io_mapped_ubuf *imu;
/* stores selected buf, valid IFF REQ_F_BUFFER_SELECTED is set */
struct io_buffer *kbuf;
};
union { union {
/* used by request caches, completion batching and iopoll */ /* used by request caches, completion batching and iopoll */
...@@ -976,8 +982,6 @@ struct io_kiocb { ...@@ -976,8 +982,6 @@ struct io_kiocb {
struct async_poll *apoll; struct async_poll *apoll;
/* opcode allocated if it needs to store data for async defer */ /* opcode allocated if it needs to store data for async defer */
void *async_data; void *async_data;
/* stores selected buf, valid IFF REQ_F_BUFFER_SELECTED is set */
struct io_buffer *kbuf;
/* linked requests, IFF REQ_F_HARDLINK or REQ_F_LINK are set */ /* linked requests, IFF REQ_F_HARDLINK or REQ_F_LINK are set */
struct io_kiocb *link; struct io_kiocb *link;
/* custom credentials, valid IFF REQ_F_CREDS is set */ /* custom credentials, valid IFF REQ_F_CREDS is set */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment