diff options
author | Mike Marciniszyn <[email protected]> | 2021-07-15 12:04:40 -0400 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2021-07-30 09:27:54 -0300 |
commit | e9901043b25000ed21c7073373a7d9fd64f3d1e3 (patch) | |
tree | 04a73e8543b894417c2ef0d4793d4a096bb609c6 | |
parent | 07d0f314ba75cba17c3fad0a3d4e640e757897d7 (diff) |
IB/hfi1: Indicate DMA wait when txq is queued for wakeup
There is no counter for dmawait in AIP, which hampers debugging
performance issues.
Add the counter increment when the txq is queued.
Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r-- | drivers/infiniband/hw/hfi1/ipoib_tx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c index 993f9838b6c8..e74ddbe46589 100644 --- a/drivers/infiniband/hw/hfi1/ipoib_tx.c +++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c @@ -644,10 +644,13 @@ static int hfi1_ipoib_sdma_sleep(struct sdma_engine *sde, /* came from non-list submit */ list_add_tail(&txreq->list, &txq->tx_list); if (list_empty(&txq->wait.list)) { + struct hfi1_ibport *ibp = &sde->ppd->ibport_data; + if (!atomic_xchg(&txq->no_desc, 1)) { trace_hfi1_txq_queued(txq); hfi1_ipoib_stop_txq(txq); } + ibp->rvp.n_dmawait++; iowait_queue(pkts_sent, wait->iow, &sde->dmawait); } |