Skip to contentSkip to conversation

ath11k: Add dynamic tcl ring selection logic with retry mechanism

PATCH In review Sriram R 2 participants 3 messages Apr 13, 2020 – Apr 15, 2020 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore

Sriram R

author
#0 lore raw

PATCH 1/1 ath11k: Add dynamic tcl ring selection logic with retry mechanism

IPQ8074 HW supports three TCL rings for tx. Currently these rings are mapped based on the Access categories, viz. VO, VI, BE, BK. In case, one of the traffic type dominates, then it could stress the same tcl rings. Rather, it would be optimal to make use of all the rings in a round robin fashion irrespective of the traffic type so that the load could be evenly distributed among all the rings. Also, in case the selected ring is busy or full, a retry mechanism is used to ensure other available ring is selected without dropping the packet.

In SMP systems, this change avoids a single CPU from getting hogged when heavy traffic of same category is transmitted.
The tx completion interrupts corresponding to the used tcl ring would be more which causes the assigned CPU to get hogged. Distribution of tx packets to different tcl rings helps balance this load.

---
 drivers/net/wireless/ath/ath11k/core.h  |  3 +++
 drivers/net/wireless/ath/ath11k/dp_tx.c | 46 +++++++++++++++++++++++++++------
 2 files changed, 41 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/core.h +3 -0
index b4c3e041..2e20faa 100644
@@ -656,6 +656,9 @@ struct ath11k_base {
 		u32 fw_crash_counter;
 	} stats;
 	u32 pktlog_defs_checksum;
+
+	/* Round robbin based TCL ring selector */
+	atomic_t tcl_ring_selector;
 };
 
 struct ath11k_fw_stats_pdev {
drivers/net/wireless/ath/ath11k/dp_tx.c +38 -8

86 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw
Quoted 17 lines · Sriram R

IPQ8074 HW supports three TCL rings for tx. Currently these rings are mapped based on the Access categories, viz. VO, VI, BE, BK. In case, one of the traffic type dominates, then it could stress the same tcl rings. Rather, it would be optimal to make use of all the rings in a round robin fashion irrespective of the traffic type so that the load could be evenly distributed among all the rings. Also, in case the selected ring is busy or full, a retry mechanism is used to ensure other available ring is selected without dropping the packet.

In SMP systems, this change avoids a single CPU from getting hogged when heavy traffic of same category is transmitted.
The tx completion interrupts corresponding to the used tcl ring would be more which causes the assigned CPU to get hogged. Distribution of tx packets to different tcl rings helps balance this load.

Quoted 2 lines

Patch applied to ath-next branch of ath.git, thanks.

d687275b268b ath11k: Add dynamic tcl ring selection logic with retry mechanism

Signature · 8 lines
https://patchwork.kernel.org/patch/11485549/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#2 lore raw
In reply to Sriram R
Quoted 17 lines · Sriram R

IPQ8074 HW supports three TCL rings for tx. Currently these rings are mapped based on the Access categories, viz. VO, VI, BE, BK. In case, one of the traffic type dominates, then it could stress the same tcl rings. Rather, it would be optimal to make use of all the rings in a round robin fashion irrespective of the traffic type so that the load could be evenly distributed among all the rings. Also, in case the selected ring is busy or full, a retry mechanism is used to ensure other available ring is selected without dropping the packet.

In SMP systems, this change avoids a single CPU from getting hogged when heavy traffic of same category is transmitted.
The tx completion interrupts corresponding to the used tcl ring would be more which causes the assigned CPU to get hogged. Distribution of tx packets to different tcl rings helps balance this load.

Quoted 2 lines

Patch applied to ath-next branch of ath.git, thanks.

d687275b268b ath11k: Add dynamic tcl ring selection logic with retry mechanism

Signature · 3 lines
https://patchwork.kernel.org/patch/11485549/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches