aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2014-04-21 19:14:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-04-22 14:09:37 -0400
commitc82552c5b0cb1735dbcbad78b1ffc6d3c212dc56 (patch)
treea788914c98510b2db67c78d411e1a8e97f09f187 /drivers/net
parent3a758134e66ca74a9df792616b5288b2fa2cfd7f (diff)
ath9k: add a recv budget
Implement a recv budget so that in cases of high traffic we still allow other taskets to get processed. Without this, we can encounter a host of issues during high wireless traffic reception depending on system load including rcu stall's detected (ARM), soft lockups, failure to service critical tasks such as watchdog resets, and triggering of the tx stuck tasklet. The same thing was proposed previously by Ben: http://www.spinics.net/lists/linux-wireless/msg112891.html The only difference here is that I make sure only processed packets are counted in the budget by checking at the end of the rx loop. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index e77a2536b818..19df969ec909 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -975,6 +975,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
975 u64 tsf = 0; 975 u64 tsf = 0;
976 unsigned long flags; 976 unsigned long flags;
977 dma_addr_t new_buf_addr; 977 dma_addr_t new_buf_addr;
978 unsigned int budget = 512;
978 979
979 if (edma) 980 if (edma)
980 dma_type = DMA_BIDIRECTIONAL; 981 dma_type = DMA_BIDIRECTIONAL;
@@ -1121,6 +1122,9 @@ requeue:
1121 if (!flush) 1122 if (!flush)
1122 ath9k_hw_rxena(ah); 1123 ath9k_hw_rxena(ah);
1123 } 1124 }
1125
1126 if (!budget--)
1127 break;
1124 } while (1); 1128 } while (1);
1125 1129
1126 if (!(ah->imask & ATH9K_INT_RXEOL)) { 1130 if (!(ah->imask & ATH9K_INT_RXEOL)) {