Skip to content

Commit

Permalink
RDMA/ocrdma: Reorg structures to avoid padding
Browse files Browse the repository at this point in the history
Reorg structures to better packing to avoid cacheline padding.

Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Naresh Gottumukkala authored and Roland Dreier committed Jun 20, 2013
1 parent df176ea commit 9884bcd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/infiniband/hw/ocrdma/ocrdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,24 +236,23 @@ struct ocrdma_srq {
struct ib_srq ibsrq;
struct ocrdma_dev *dev;
u8 __iomem *db;
struct ocrdma_qp_hwq_info rq;
u64 *rqe_wr_id_tbl;
u32 *idx_bit_fields;
u32 bit_fields_len;

/* provide synchronization to multiple context(s) posting rqe */
spinlock_t q_lock ____cacheline_aligned;

struct ocrdma_qp_hwq_info rq;
struct ocrdma_pd *pd;
u32 id;
u64 *rqe_wr_id_tbl;
u32 *idx_bit_fields;
u32 bit_fields_len;
};

struct ocrdma_qp {
struct ib_qp ibqp;
struct ocrdma_dev *dev;

u8 __iomem *sq_db;
/* provide synchronization to multiple context(s) posting wqe, rqe */
spinlock_t q_lock ____cacheline_aligned;
struct ocrdma_qp_hwq_info sq;
struct {
uint64_t wrid;
Expand All @@ -263,6 +262,9 @@ struct ocrdma_qp {
uint8_t rsvd[3];
} *wqe_wr_id_tbl;
u32 max_inline_data;

/* provide synchronization to multiple context(s) posting wqe, rqe */
spinlock_t q_lock ____cacheline_aligned;
struct ocrdma_cq *sq_cq;
/* list maintained per CQ to flush SQ errors */
struct list_head sq_entry;
Expand Down

0 comments on commit 9884bcd

Please sign in to comment.