[PATCH v2 12/12] ath11k: avoid unnecessary lock contention in tx_completion path

Peter Oh peter.oh at eero.com
Wed Aug 25 14:56:12 PDT 2021


On 8/25/21 2:37 AM, P Praneesh wrote:
> @@ -584,16 +580,15 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
>   			continue;
>   		}
>   
> -		spin_lock_bh(&tx_ring->tx_idr_lock);
> -		msdu = idr_find(&tx_ring->txbuf_idr, msdu_id);
missing spin_lock(&tx_ring->tx_idr_lock);here?
> +		msdu = idr_remove(&tx_ring->txbuf_idr, msdu_id);
>   		if (unlikely(!msdu)) {
>   			ath11k_warn(ab, "tx completion for unknown msdu_id %d\n",
>   				    msdu_id);
> -			spin_unlock_bh(&tx_ring->tx_idr_lock);
> +			spin_unlock(&tx_ring->tx_idr_lock);
>   			continue;
>   		}
> -		idr_remove(&tx_ring->txbuf_idr, msdu_id);
> -		spin_unlock_bh(&tx_ring->tx_idr_lock);
> +
> +		spin_unlock(&tx_ring->tx_idr_lock);
>   
>   		ar = ab->pdevs[mac_id].ar;
>   



More information about the ath11k mailing list