RDMA/siw: Move tx_cpu ahead
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Sun, 3 Dec 2023 09:26:52 +0000 (17:26 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 5 Dec 2023 00:13:30 +0000 (20:13 -0400)
We can reduce one cacheline for the usage of struct siw_qp.

Before,

/* size: 1928, cachelines: 31, members: 38 */
/* sum members: 1920, holes: 2, sum holes: 8 */
/* paddings: 4, sum paddings: 13 */
/* forced alignments: 3 */

after

/* size: 1920, cachelines: 30, members: 38 */
/* paddings: 4, sum paddings: 13 */
/* forced alignments: 3 */

Link: https://lore.kernel.org/r/20231203092655.28102-2-guoqing.jiang@linux.dev
Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/siw/siw.h

index b36d1ec25327822a5640670ca841d8ad19798b4c..d14bb965af755c5ed56b4609c0d99068eb5ffbcf 100644 (file)
@@ -417,10 +417,10 @@ struct siw_iwarp_tx {
 struct siw_qp {
        struct ib_qp base_qp;
        struct siw_device *sdev;
+       int tx_cpu;
        struct kref ref;
        struct completion qp_free;
        struct list_head devq;
-       int tx_cpu;
        struct siw_qp_attrs attrs;
 
        struct siw_cep *cep;