IB/qib: Add cache line awareness to qib_qp and qib_devdata structures
This patch reorganizes the QP and devdata files to be more cache line aware. qib_qp fields in particular are split into read-mostly, send, and receive fields. qib_devdata fields are split into read-mostly and read/write fields Testing has show that bidirectional tests improve by as much as 100% with this patch. Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:

committed by
Roland Dreier

parent
3236b2d469
commit
1c94283ddb
@@ -1038,6 +1038,11 @@ struct ib_qp *qib_create_qp(struct ib_pd *ibpd,
|
||||
goto bail_swq;
|
||||
}
|
||||
RCU_INIT_POINTER(qp->next, NULL);
|
||||
qp->s_hdr = kzalloc(sizeof(*qp->s_hdr), GFP_KERNEL);
|
||||
if (!qp->s_hdr) {
|
||||
ret = ERR_PTR(-ENOMEM);
|
||||
goto bail_qp;
|
||||
}
|
||||
qp->timeout_jiffies =
|
||||
usecs_to_jiffies((4096UL * (1UL << qp->timeout)) /
|
||||
1000UL);
|
||||
@@ -1159,6 +1164,7 @@ bail_ip:
|
||||
vfree(qp->r_rq.wq);
|
||||
free_qpn(&dev->qpn_table, qp->ibqp.qp_num);
|
||||
bail_qp:
|
||||
kfree(qp->s_hdr);
|
||||
kfree(qp);
|
||||
bail_swq:
|
||||
vfree(swq);
|
||||
@@ -1214,6 +1220,7 @@ int qib_destroy_qp(struct ib_qp *ibqp)
|
||||
else
|
||||
vfree(qp->r_rq.wq);
|
||||
vfree(qp->s_wq);
|
||||
kfree(qp->s_hdr);
|
||||
kfree(qp);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user