io_uring: optimise kiocb layout
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 4 Oct 2021 19:02:46 +0000 (20:02 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:54 +0000 (05:49 -0600)
commit7e3709d57651feab9c77d7a5a8024041f73f69f7
tree750ac9c551a1791792c7a15b104c0684aa393c04
parent6224590d242fc8c6b26941328e02a40b4384949b
io_uring: optimise kiocb layout

We want ->comp_list in the second cacheline, which is hotter comparing
to the 3rd. Swap the field with ->link, which is not as hot and
controlled by flags and so not accessed unless there is a link.

By the way add a couple of comments for io_kiocb fields.

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