lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 4/7] ath10k: Do not exhaust budget on process tx completion
Date
Currently the entire NAPI budget is marked as exhausted
if any tx completion is processed.
In scenarios of bi-directional traffic, this leads to a
situation where the irqs are never enabled and the NAPI
is rescheuled again and again.

Increase the work done quota by the number of tx completions
which are processed in the NAPI context.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
---
drivers/net/wireless/ath/ath10k/htt_rx.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index cac05e7..a4a6618 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -4077,21 +4077,18 @@ int ath10k_htt_txrx_compl_task(struct ath10k *ar, int budget)
/* Deliver received data after processing data from hardware */
quota = ath10k_htt_rx_deliver_msdu(ar, quota, budget);

- /* From NAPI documentation:
- * The napi poll() function may also process TX completions, in which
- * case if it processes the entire TX ring then it should count that
- * work as the rest of the budget.
- */
- if ((quota < budget) && !kfifo_is_empty(&htt->txdone_fifo))
- quota = budget;
-
/* kfifo_get: called only within txrx_tasklet so it's neatly serialized.
* From kfifo_get() documentation:
* Note that with only one concurrent reader and one concurrent writer,
* you don't need extra locking to use these macro.
*/
- while (kfifo_get(&htt->txdone_fifo, &tx_done))
+ while (kfifo_get(&htt->txdone_fifo, &tx_done)) {
ath10k_txrx_tx_unref(htt, &tx_done);
+ quota++;
+ }
+
+ if (quota > budget)
+ resched_napi = true;

ath10k_mac_tx_push_pending(ar);

--
2.7.4
\
 
 \ /
  Last update: 2020-07-21 19:17    [W:0.212 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site