ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: John Crispin <john@phrozen.org>
Cc: ath11k@lists.infradead.org,
	Shashidhar Lakkavalli <slakkavalli@datto.com>
Subject: Re: [PATCH V2] ath11k: optimize RX path latency
Date: Tue, 15 Oct 2019 16:12:21 +0300	[thread overview]
Message-ID: <87a7a2xidm.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20191004100429.24565-1-john@phrozen.org> (John Crispin's message of "Fri, 4 Oct 2019 12:04:29 +0200")

John Crispin <john@phrozen.org> writes:

> This patch drops ath11k_hal_rx_parse_dst_ring_desc(). This function was
> creating a huge amount of load, which lead to a signifcant latency delay
> when processing data in the RX path.
>
> Pegging the processing on a specific core and running perf --top we get
> the following output when running HE80 at a fixed bandwidth of 1gbit.
>
> with patch
>     19.19%  [ath11k]       [k] ath11k_dp_process_rx
>      5.02%  [ath11k]       [k] ath11k_dp_rx_tid_del_func
>      4.39%  [kernel]       [k] v7_dma_inv_range
>      4.15%  [kernel]       [k] __slab_alloc.constprop.1
>      4.03%  [kernel]       [k] dev_gro_receive
>      3.86%  [kernel]       [k] tcp_gro_receive
>      3.07%  [ip_tables]    [k] ipt_do_table
>      2.96%  [kernel]       [k] dma_cache_maint_page
>
> without patch
>     21.64%  [ath11k]       [k] ath11k_hal_rx_parse_dst_ring_desc
>     10.80%  [ath11k]       [k] ath11k_dp_process_rx
>      3.77%  [kernel]       [k] v7_dma_inv_range
>      3.48%  [kernel]       [k] dev_gro_receive
>      3.32%  [ath11k]       [k] ath11k_dp_rx_tid_del_func
>      3.17%  [mac80211]     [k] ieee80211_rx_napi
>      2.70%  [kernel]       [k] dma_cache_maint_page
>      2.65%  [mac80211]     [k] ieee80211_sta_ps_transition
>
> When removing the the bandwidth limit and rerunning the test we see an
> overall throughput improvement of 3-400mbit when running 4x4 HE80.
>
> Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
> Signed-off-by: John Crispin <john@phrozen.org>

A great finding! Amazing how this small patch can make such a big
difference, this has to be a some kind of record :)

> @@ -2192,9 +2196,12 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int mac_id,
>  			continue;
>  		}
>  
> -		rxcb->is_first_msdu = meta_info.msdu_meta.first;
> -		rxcb->is_last_msdu = meta_info.msdu_meta.last;
> -		rxcb->is_continuation = meta_info.msdu_meta.continuation;
> +		rxcb->is_first_msdu =
> +			!!(desc->rx_msdu_info.info0 & RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU);
> +		rxcb->is_last_msdu =
> +			!!(desc->rx_msdu_info.info0 & RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU);
> +		rxcb->is_continuation =
> +			!!(desc->rx_msdu_info.info0 & RX_MSDU_DESC_INFO0_MSDU_CONTINUATION);

Checkpatch warned about this:

drivers/net/wireless/ath/ath11k/dp_rx.c:2200: line over 90 characters
drivers/net/wireless/ath/ath11k/dp_rx.c:2202: line over 90 characters
drivers/net/wireless/ath/ath11k/dp_rx.c:2204: line over 90 characters

So I reformatted the lines a bit, please check my changes:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending-ath11k&id=4dc613aeef4243ee4053972656f6932b5f6a614c

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  reply	other threads:[~2019-10-15 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 10:04 [PATCH V2] ath11k: optimize RX path latency John Crispin
2019-10-15 13:12 ` Kalle Valo [this message]
2019-10-15 13:20   ` John Crispin
2019-10-16  8:53 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7a2xidm.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=john@phrozen.org \
    --cc=slakkavalli@datto.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox