From: Kalle Valo <kvalo@codeaurora.org>
To: John Crispin <john@phrozen.org>
Cc: ath11k@lists.infradead.org,
Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Subject: Re: [RFC 2/2] ath11k: drop memset in tx status hotpath
Date: Fri, 28 Jun 2019 14:21:07 +0300 [thread overview]
Message-ID: <87sgruez18.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20190628101127.6044-2-john@phrozen.org> (John Crispin's message of "Fri, 28 Jun 2019 12:11:27 +0200")
John Crispin <john@phrozen.org> writes:
> This in a small but measurable performance increase.
>
> Signed-off-by: John Crispin <john@phrozen.org>
> ---
> drivers/net/wireless/ath/ath11k/dp_tx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
> index b3d5995fc657..8c5db3c88a87 100644
> --- a/drivers/net/wireless/ath/ath11k/dp_tx.c
> +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
> @@ -448,7 +448,6 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
> int hal_ring_id = dp->tx_ring[ring_id].tcl_comp_ring.ring_id;
> struct hal_srng *status_ring = &ab->hal.srng_list[hal_ring_id];
> struct sk_buff *msdu;
> - struct hal_tx_status ts;
> struct dp_tx_ring *tx_ring = &dp->tx_ring[ring_id];
> u32 msdu_id;
> u32 *desc;
> @@ -459,7 +458,8 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
> ath11k_hal_srng_access_begin(ab, status_ring);
>
> while ((desc = ath11k_hal_srng_dst_get_next_entry(ab, status_ring))) {
> - memset(&ts, 0, sizeof(ts));
> + struct hal_tx_status ts = { 0 };
Very interesting, so a compiler zeroes memory from stack faster than
memset() from "heap" (or whatever kmalloced memory should be called)?
Just out of curiosity, any ideas why memset() is so slow?
Also some kind of numbers (before and after) would be nice to have in
the commit log. It's not uncommon that years after we investigate why a
certain change was made.
--
Kalle Valo
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2019-06-28 11:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 10:11 [RFC 1/2] ath11k: drop tx_status_fifo John Crispin
2019-06-28 10:11 ` [RFC 2/2] ath11k: drop memset in tx status hotpath John Crispin
2019-06-28 11:21 ` Kalle Valo [this message]
2019-06-28 11:07 ` [RFC 1/2] ath11k: drop tx_status_fifo Vasanthakumar Thiagarajan
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=87sgruez18.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=john@phrozen.org \
--cc=rmanohar@qti.qualcomm.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