+19
−18
Loading
1. move 'data' member
'data' member contains sgl[16] which occupies 256 bytes
Typically no all sgl elements are using, so there is a
gap between members of spdk_nvmf_rdma_request located
after 'data'. Accessing these members might be more
cache efficient if we move 'data' member to the end
of spdk_nvmf_rdma_request structure.
2. Move spdk_nvmf_rdma_wr rdma_wr out of
spdk_nvmf_rdma_request_data structure. That creates
additional hole due to structure alignment requirements
3. The same for rsp structure
4. Change type of state to uint8_t - that is enough to
hold all values of spdk_nvmf_rdma_request_state enum
5. Change type of spdk_nvmf_rdma_wr::type to uint8_t
for the same reason
6. Move fused_failed due to better packing of bool
with other 1-byte members.
Before this change:
/* size: 1376, cachelines: 22, members: 12 */
/* sum members: 1369, holes: 1, sum holes: 7 */
/* last cacheline: 32 bytes */
With this chagne:
/* size: 1352, cachelines: 22, members: 14 */
/* last cacheline: 8 bytes */
Signed-off-by:
Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I4806fd20f9dc001edff9409e1bdd55d88266309d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19120
Community-CI: Mellanox Build Bot
Reviewed-by:
Jim Harris <jim.harris@gmail.com>
Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>