mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-28 09:55:18 +00:00
mac80211: run late dequeue late tx handlers without holding fq->lock
Reduces lock contention on enqueue/dequeue of iTXQ packets Signed-off-by: Felix Fietkau <nbd@nbd.name> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
f2af2df800
commit
ded4698b58
1 changed files with 8 additions and 2 deletions
|
@ -3535,6 +3535,7 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
|
||||||
ieee80211_tx_result r;
|
ieee80211_tx_result r;
|
||||||
struct ieee80211_vif *vif = txq->vif;
|
struct ieee80211_vif *vif = txq->vif;
|
||||||
|
|
||||||
|
begin:
|
||||||
spin_lock_bh(&fq->lock);
|
spin_lock_bh(&fq->lock);
|
||||||
|
|
||||||
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
|
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
|
||||||
|
@ -3551,11 +3552,12 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
|
||||||
if (skb)
|
if (skb)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
begin:
|
|
||||||
skb = fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
|
skb = fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
spin_unlock_bh(&fq->lock);
|
||||||
|
|
||||||
hdr = (struct ieee80211_hdr *)skb->data;
|
hdr = (struct ieee80211_hdr *)skb->data;
|
||||||
info = IEEE80211_SKB_CB(skb);
|
info = IEEE80211_SKB_CB(skb);
|
||||||
|
|
||||||
|
@ -3600,8 +3602,11 @@ begin:
|
||||||
|
|
||||||
skb = __skb_dequeue(&tx.skbs);
|
skb = __skb_dequeue(&tx.skbs);
|
||||||
|
|
||||||
if (!skb_queue_empty(&tx.skbs))
|
if (!skb_queue_empty(&tx.skbs)) {
|
||||||
|
spin_lock_bh(&fq->lock);
|
||||||
skb_queue_splice_tail(&tx.skbs, &txqi->frags);
|
skb_queue_splice_tail(&tx.skbs, &txqi->frags);
|
||||||
|
spin_unlock_bh(&fq->lock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skb_has_frag_list(skb) &&
|
if (skb_has_frag_list(skb) &&
|
||||||
|
@ -3640,6 +3645,7 @@ begin:
|
||||||
}
|
}
|
||||||
|
|
||||||
IEEE80211_SKB_CB(skb)->control.vif = vif;
|
IEEE80211_SKB_CB(skb)->control.vif = vif;
|
||||||
|
return skb;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
spin_unlock_bh(&fq->lock);
|
spin_unlock_bh(&fq->lock);
|
||||||
|
|
Loading…
Add table
Reference in a new issue