mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
IB/hfi1: Add the counter n_tidwait
This patch adds the counter n_tidwait to count the number of times the TID resource allocator has to wait for TID resources. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Kaike Wan <kaike.wan@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
838b6fd2d9
commit
2f16a696a0
5 changed files with 17 additions and 0 deletions
|
@ -4253,6 +4253,8 @@ static struct cntr_entry dev_cntrs[DEV_CNTR_LAST] = {
|
||||||
access_sw_pio_drain),
|
access_sw_pio_drain),
|
||||||
[C_SW_KMEM_WAIT] = CNTR_ELEM("KmemWait", 0, 0, CNTR_NORMAL,
|
[C_SW_KMEM_WAIT] = CNTR_ELEM("KmemWait", 0, 0, CNTR_NORMAL,
|
||||||
access_sw_kmem_wait),
|
access_sw_kmem_wait),
|
||||||
|
[C_SW_TID_WAIT] = CNTR_ELEM("TidWait", 0, 0, CNTR_NORMAL,
|
||||||
|
hfi1_access_sw_tid_wait),
|
||||||
[C_SW_SEND_SCHED] = CNTR_ELEM("SendSched", 0, 0, CNTR_NORMAL,
|
[C_SW_SEND_SCHED] = CNTR_ELEM("SendSched", 0, 0, CNTR_NORMAL,
|
||||||
access_sw_send_schedule),
|
access_sw_send_schedule),
|
||||||
[C_SDMA_DESC_FETCHED_CNT] = CNTR_ELEM("SDEDscFdCn",
|
[C_SDMA_DESC_FETCHED_CNT] = CNTR_ELEM("SDEDscFdCn",
|
||||||
|
|
|
@ -927,6 +927,7 @@ enum {
|
||||||
C_SW_PIO_WAIT,
|
C_SW_PIO_WAIT,
|
||||||
C_SW_PIO_DRAIN,
|
C_SW_PIO_DRAIN,
|
||||||
C_SW_KMEM_WAIT,
|
C_SW_KMEM_WAIT,
|
||||||
|
C_SW_TID_WAIT,
|
||||||
C_SW_SEND_SCHED,
|
C_SW_SEND_SCHED,
|
||||||
C_SDMA_DESC_FETCHED_CNT,
|
C_SDMA_DESC_FETCHED_CNT,
|
||||||
C_SDMA_INT_CNT,
|
C_SDMA_INT_CNT,
|
||||||
|
|
|
@ -495,6 +495,7 @@ static void queue_qp_for_tid_wait(struct hfi1_ctxtdata *rcd,
|
||||||
qp->s_flags |= HFI1_S_WAIT_TID_SPACE;
|
qp->s_flags |= HFI1_S_WAIT_TID_SPACE;
|
||||||
list_add_tail(&priv->tid_wait, &queue->queue_head);
|
list_add_tail(&priv->tid_wait, &queue->queue_head);
|
||||||
priv->tid_enqueue = ++queue->enqueue;
|
priv->tid_enqueue = ++queue->enqueue;
|
||||||
|
rcd->dd->verbs_dev.n_tidwait++;
|
||||||
trace_hfi1_qpsleep(qp, HFI1_S_WAIT_TID_SPACE);
|
trace_hfi1_qpsleep(qp, HFI1_S_WAIT_TID_SPACE);
|
||||||
rvt_get_qp(qp);
|
rvt_get_qp(qp);
|
||||||
}
|
}
|
||||||
|
@ -1569,3 +1570,11 @@ static void hfi1_init_trdma_req(struct rvt_qp *qp,
|
||||||
req->qp = qp;
|
req->qp = qp;
|
||||||
req->rcd = qpriv->rcd;
|
req->rcd = qpriv->rcd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u64 hfi1_access_sw_tid_wait(const struct cntr_entry *entry,
|
||||||
|
void *context, int vl, int mode, u64 data)
|
||||||
|
{
|
||||||
|
struct hfi1_devdata *dd = context;
|
||||||
|
|
||||||
|
return dd->verbs_dev.n_tidwait;
|
||||||
|
}
|
||||||
|
|
|
@ -155,4 +155,8 @@ int hfi1_kern_setup_hw_flow(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp);
|
||||||
void hfi1_kern_clear_hw_flow(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp);
|
void hfi1_kern_clear_hw_flow(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp);
|
||||||
void hfi1_kern_init_ctxt_generations(struct hfi1_ctxtdata *rcd);
|
void hfi1_kern_init_ctxt_generations(struct hfi1_ctxtdata *rcd);
|
||||||
|
|
||||||
|
struct cntr_entry;
|
||||||
|
u64 hfi1_access_sw_tid_wait(const struct cntr_entry *entry,
|
||||||
|
void *context, int vl, int mode, u64 data);
|
||||||
|
|
||||||
#endif /* HFI1_TID_RDMA_H */
|
#endif /* HFI1_TID_RDMA_H */
|
||||||
|
|
|
@ -243,6 +243,7 @@ struct hfi1_ibdev {
|
||||||
struct kmem_cache *verbs_txreq_cache;
|
struct kmem_cache *verbs_txreq_cache;
|
||||||
u64 n_txwait;
|
u64 n_txwait;
|
||||||
u64 n_kmem_wait;
|
u64 n_kmem_wait;
|
||||||
|
u64 n_tidwait;
|
||||||
|
|
||||||
/* protect iowait lists */
|
/* protect iowait lists */
|
||||||
seqlock_t iowait_lock ____cacheline_aligned_in_smp;
|
seqlock_t iowait_lock ____cacheline_aligned_in_smp;
|
||||||
|
|
Loading…
Add table
Reference in a new issue