From: Yury Norov <yury.norov@gmail.com>
To: linux-kernel@vger.kernel.org, Kalle Valo <kvalo@kernel.org>,
Jeff Johnson <quic_jjohnson@quicinc.com>,
ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Cc: Yury Norov <yury.norov@gmail.com>, Jan Kara <jack@suse.cz>,
Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>,
Matthew Wilcox <willy@infradead.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>,
Alexey Klimov <klimov.linux@gmail.com>
Subject: [PATCH 10/34] ath10k: optimize ath10k_snoc_napi_poll() by using find_bit()
Date: Sat, 18 Nov 2023 07:50:41 -0800 [thread overview]
Message-ID: <20231118155105.25678-11-yury.norov@gmail.com> (raw)
In-Reply-To: <20231118155105.25678-1-yury.norov@gmail.com>
ath10k_snoc_napi_poll() traverses pending_ce_irqs bitmap bit by bit.
We can do it faster by using for_each_test_and_clear_bit() iterator.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
---
drivers/net/wireless/ath/ath10k/snoc.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 2c39bad7ebfb..a1db5a973780 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1237,11 +1237,10 @@ static int ath10k_snoc_napi_poll(struct napi_struct *ctx, int budget)
return done;
}
- for (ce_id = 0; ce_id < CE_COUNT; ce_id++)
- if (test_and_clear_bit(ce_id, ar_snoc->pending_ce_irqs)) {
- ath10k_ce_per_engine_service(ar, ce_id);
- ath10k_ce_enable_interrupt(ar, ce_id);
- }
+ for_each_test_and_clear_bit(ce_id, ar_snoc->pending_ce_irqs, CE_COUNT) {
+ ath10k_ce_per_engine_service(ar, ce_id);
+ ath10k_ce_enable_interrupt(ar, ce_id);
+ }
done = ath10k_htt_txrx_compl_task(ar, budget);
--
2.39.2
next prev parent reply other threads:[~2023-11-18 15:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 15:50 [PATCH 00/34] biops: add atomig find_bit() operations Yury Norov
2023-11-18 15:50 ` [PATCH 01/34] lib/find: add atomic find_bit() primitives Yury Norov
2023-11-18 16:23 ` Bart Van Assche
2023-11-18 15:50 ` Yury Norov [this message]
2023-11-18 15:50 ` [PATCH 11/34] wifi: rtw88: optimize rtw_pci_tx_kick_off() by using find_bit() Yury Norov
2023-11-18 15:50 ` [PATCH 12/34] wifi: intel: use atomic find_bit() API where appropriate Yury Norov
2023-11-19 19:58 ` Johannes Berg
2023-11-21 16:36 ` Yury Norov
2023-11-18 16:18 ` [PATCH 00/34] biops: add atomig find_bit() operations Bart Van Assche
2023-11-18 19:06 ` Sergey Shtylyov
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=20231118155105.25678-11-yury.norov@gmail.com \
--to=yury.norov@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ath10k@lists.infradead.org \
--cc=jack@suse.cz \
--cc=klimov.linux@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=maxim.kuvyrkov@linaro.org \
--cc=mirsad.todorovac@alu.unizg.hr \
--cc=quic_jjohnson@quicinc.com \
--cc=willy@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).