ath9k: use split rx buffers to get rid of order-1 skb allocations
PATCH 1/1 ath9k: use split rx buffers to get rid of order-1 skb allocations
With this change, less CPU time is spent trying to look for consecutive pages for rx skbs. This also reduces the socket memory required for IP/UDP reassembly.
Only two buffers per frame are supported. Frames spanning more buffers will be dropped, but the buffer size is enough to handle the required AMSDU size.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 2 + drivers/net/wireless/ath/ath9k/main.c | 5 ++ drivers/net/wireless/ath/ath9k/recv.c | 88 +++++++++++++++++++++++--------- 3 files changed, 71 insertions(+), 24 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +2 -0
@@ -311,6 +311,8 @@ struct ath_rx {struct ath_descdma rxdma;struct ath_buf *rx_bufptr;struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX ]; + +struct sk_buff *frag; };int ath_startrecv (struct ath_softc *sc);
drivers/net/wireless/ath/ath9k/main.c +5 -0
@@ -1294,6 +1294,11 @@ static void ath9k_stop(struct ieee80211_hw *hw) }else sc->rx.rxlink =NULL ; +if (sc->rx.frag) { +dev_kfree_skb_any (sc->rx.frag); + sc->rx.frag =NULL ; + } +/* disable HAL and put h/w to sleep */ ath9k_hw_disable (ah);ath9k_hw_configpcipowersave (ah,1 ,1 );
drivers/net/wireless/ath/ath9k/recv.c +64 -24
162 lines not on this page · raw message
Signature · 1 line
1.7.3.2
Quoted 9 lines · Felix Fietkau
With this change, less CPU time is spent trying to look for consecutive pages for rx skbs. This also reduces the socket memory required for IP/UDP reassembly.
Only two buffers per frame are supported. Frames spanning more buffers will be dropped, but the buffer size is enough to handle the required AMSDU size.Signed-off-by Jouni Malinen <[email protected]>Signed-off-by Felix Fietkau <[email protected]>
Will this address https://bugzilla.kernel.org/show_bug.cgi?id=26652 ?
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Quoted 8 lines · John W. Linville
Quoted 7 lines · Felix Fietkau
With this change, less CPU time is spent trying to look for consecutive pages for rx skbs. This also reduces the socket memory required for IP/UDP reassembly.
Only two buffers per frame are supported. Frames spanning more buffers will be dropped, but the buffer size is enough to handle the required AMSDU size.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Jouni Malinen <[email protected]>Signed-off-by Felix Fietkau <[email protected]>Will this address https://bugzilla.kernel.org/show_bug.cgi?id=26652 ?
I think so. Memory allocation will fail less frequently and it reduces RAM usage per device by 2 MB.
- Felix