Skip to content

Commit

Permalink
ath9k: add a recv budget
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tim Harvey authored and John W. Linville committed Apr 22, 2014
1 parent 3a75813 commit c82552c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
u64 tsf = 0;
unsigned long flags;
dma_addr_t new_buf_addr;
unsigned int budget = 512;

if (edma)
dma_type = DMA_BIDIRECTIONAL;
Expand Down Expand Up @@ -1121,6 +1122,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
if (!flush)
ath9k_hw_rxena(ah);
}

if (!budget--)
break;
} while (1);

if (!(ah->imask & ATH9K_INT_RXEOL)) {
Expand Down

0 comments on commit c82552c

Please sign in to comment.