提交 7ebfc93e 编写于 作者: S Sebastian Sanchez 提交者: Doug Ledford

IB/rdmavt: Correct issues with read-mostly and send size cache lines

The s_ahgpsn was incorrectly placed in the read-mostly section of the QP
and the s_curr_size and s_hdrwords are oversized. The misplaced
s_ahgpsn will cause the read-mostly cachelines to thrash.

Place s_ahgpsn in the send side cache lines and correctly size and
s_hdrwords and s_cur_size to keep the send side cachelines at the same
size.
Reviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NSebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 a917374e
...@@ -8739,7 +8739,7 @@ static int set_physical_link_state(struct hfi1_devdata *dd, u64 state) ...@@ -8739,7 +8739,7 @@ static int set_physical_link_state(struct hfi1_devdata *dd, u64 state)
return do_8051_command(dd, HCMD_CHANGE_PHY_STATE, state, NULL); return do_8051_command(dd, HCMD_CHANGE_PHY_STATE, state, NULL);
} }
int _load_8051_config(struct hfi1_devdata *dd, u8 field_id, static int _load_8051_config(struct hfi1_devdata *dd, u8 field_id,
u8 lane_id, u32 config_data) u8 lane_id, u32 config_data)
{ {
u64 data; u64 data;
......
...@@ -282,7 +282,6 @@ struct rvt_qp { ...@@ -282,7 +282,6 @@ struct rvt_qp {
u32 remote_qpn; u32 remote_qpn;
u32 qkey; /* QKEY for this QP (for UD or RD) */ u32 qkey; /* QKEY for this QP (for UD or RD) */
u32 s_size; /* send work queue size */ u32 s_size; /* send work queue size */
u32 s_ahgpsn; /* set to the psn in the copy of the header */
u16 pmtu; /* decoded from path_mtu */ u16 pmtu; /* decoded from path_mtu */
u8 log_pmtu; /* shift for pmtu */ u8 log_pmtu; /* shift for pmtu */
...@@ -344,7 +343,6 @@ struct rvt_qp { ...@@ -344,7 +343,6 @@ struct rvt_qp {
struct rvt_swqe *s_wqe; struct rvt_swqe *s_wqe;
struct rvt_sge_state s_sge; /* current send request data */ struct rvt_sge_state s_sge; /* current send request data */
struct rvt_mregion *s_rdma_mr; struct rvt_mregion *s_rdma_mr;
u32 s_cur_size; /* size of send packet in bytes */
u32 s_len; /* total length of s_sge */ u32 s_len; /* total length of s_sge */
u32 s_rdma_read_len; /* total length of s_rdma_read_sge */ u32 s_rdma_read_len; /* total length of s_rdma_read_sge */
u32 s_last_psn; /* last response PSN processed */ u32 s_last_psn; /* last response PSN processed */
...@@ -358,8 +356,10 @@ struct rvt_qp { ...@@ -358,8 +356,10 @@ struct rvt_qp {
u32 s_acked; /* last un-ACK'ed entry */ u32 s_acked; /* last un-ACK'ed entry */
u32 s_last; /* last completed entry */ u32 s_last; /* last completed entry */
u32 s_lsn; /* limit sequence number (credit) */ u32 s_lsn; /* limit sequence number (credit) */
u16 s_hdrwords; /* size of s_hdr in 32 bit words */ u32 s_ahgpsn; /* set to the psn in the copy of the header */
u16 s_cur_size; /* size of send packet in bytes */
u16 s_rdma_ack_cnt; u16 s_rdma_ack_cnt;
u8 s_hdrwords; /* size of s_hdr in 32 bit words */
s8 s_ahgidx; s8 s_ahgidx;
u8 s_state; /* opcode of last packet sent */ u8 s_state; /* opcode of last packet sent */
u8 s_ack_state; /* opcode of packet to ACK */ u8 s_ack_state; /* opcode of packet to ACK */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册