io_uring: optimise read/write iov state storing
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 14 Oct 2021 15:10:16 +0000 (16:10 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:55 +0000 (05:49 -0600)
commitc88598a92a587109d915b4d97831bcea774c8b6f
treed94e766b3fd860c0829c907f4e1d1c6f2432fba2
parent538941e2681c76ba6d6a7dd28ce691a9e02a9bdf
io_uring: optimise read/write iov state storing

Currently io_read() and io_write() keep separate pointers to an iter and
to struct iov_iter_state, which is not great for register spilling and
requires more on-stack copies. They are both either on-stack or in
req->async_data at the same time, so use struct io_rw_state and keep a
pointer only to it, so having all the state with just one pointer.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/5c5e7ffd7dc25fc35075c70411ba99df72f237fa.1634144845.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c