io_uring: Split io_issue_def struct
authorBreno Leitao <leitao@debian.org>
Thu, 12 Jan 2023 14:44:11 +0000 (06:44 -0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 29 Jan 2023 22:17:41 +0000 (15:17 -0700)
commitf30bd4d03824fb437bf080c2b2f926cfee3f09d0
tree15a2881e392b0fec4f7a217aff51864b70e42ddb
parenta7dd27828b00be8c0c7520c53baf0b360f4d8bea
io_uring: Split io_issue_def struct

This patch removes some "cold" fields from `struct io_issue_def`.

The plan is to keep only highly used fields into `struct io_issue_def`, so,
it may be hot in the cache. The hot fields are basically all the bitfields
and the callback functions for .issue and .prep.

The other less frequently used fields are now located in a secondary and
cold struct, called `io_cold_def`.

This is the size for the structs:

Before: io_issue_def = 56 bytes
After: io_issue_def = 24 bytes; io_cold_def = 40 bytes

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20230112144411.2624698-2-leitao@debian.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/opdef.c
io_uring/opdef.h
io_uring/rw.c