]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: do not recalculate ppos unnecessarily
authorDylan Yudaken <dylany@fb.com>
Tue, 22 Feb 2022 10:55:03 +0000 (02:55 -0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 10 Mar 2022 13:32:49 +0000 (06:32 -0700)
commitc11d6987dd41671eda67d8524a15eba8258cef09
treea8d536ef9a42db0804c9d0df40e5aa3e649d3f6f
parent293456c56d95ca22ef083d64a059e8843729f00d
io_uring: do not recalculate ppos unnecessarily

There is a slight optimisation to be had by calculating the correct pos
pointer inside io_kiocb_update_pos and then using that later.

It seems code size drops by a bit:
000000000000a1b0 0000000000000400 t io_read
000000000000a5b0 0000000000000319 t io_write

vs
000000000000a1b0 00000000000003f6 t io_read
000000000000a5b0 0000000000000310 t io_write

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c