From: Kalle Valo <kvalo@kernel.org>
To: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Cc: <ath12k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] wifi: ath12k: Introduce the container for mac80211 hw
Date: Tue, 16 Jan 2024 14:38:20 +0200 [thread overview]
Message-ID: <8734ux78sj.fsf@kernel.org> (raw)
In-Reply-To: <839b56fa-9ce8-47f3-768d-b4f32a2041f1@quicinc.com> (Karthikeyan Periyasamy's message of "Tue, 16 Jan 2024 10:44:46 +0530")
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>>> static void ath12k_mac_op_cancel_hw_scan(struct ieee80211_hw *hw,
>>> struct ieee80211_vif *vif)
>>> {
>>> - struct ath12k *ar = hw->priv;
>>> + struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
>>> + struct ath12k *ar;
>>> +
>>> + mutex_lock(&ah->conf_mutex);
>>> +
>>> + ar = ath12k_ah_to_ar(ah);
>>> mutex_lock(&ar->conf_mutex);
>>> ath12k_scan_abort(ar);
>>> mutex_unlock(&ar->conf_mutex);
>>> + mutex_unlock(&ah->conf_mutex);
>>> +
>>> cancel_delayed_work_sync(&ar->scan.timeout);
>>> }
>>
>> Do we really need two mutexes? I don't see any analysis about that. And
>> even if we do, I feel that it should be added in a separate patch.
>
> Yes, ah->conf_mutex protect the concurrent mac80211 operation. But
> there is other places like radio/link specific synchronous operation
> (ie MGMT tx wait for the vdev deletion) is needed. To fulfill this
> need, we also need radio/link specific (ar) mutex instead of all link
> (ah) mutex for efficient lock/unlock.
Are there any numbers to show the inefficiency? Anyway, I consider
adding new mutexes as an optimisation which could be done in a separate
patch with proper analysis.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-01-16 12:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 2:42 [PATCH v2 0/2] wifi: ath12k: Introduce hw abstraction Karthikeyan Periyasamy
2024-01-12 2:42 ` [PATCH v2 1/2] wifi: ath12k: Refactor the mac80211 hw access from link/radio Karthikeyan Periyasamy
2024-01-12 16:38 ` Jeff Johnson
2024-01-12 2:42 ` [PATCH v2 2/2] wifi: ath12k: Introduce the container for mac80211 hw Karthikeyan Periyasamy
2024-01-12 16:39 ` Jeff Johnson
2024-01-15 16:08 ` Kalle Valo
2024-01-16 5:14 ` Karthikeyan Periyasamy
2024-01-16 12:38 ` Kalle Valo [this message]
2024-01-15 16:19 ` [PATCH v2 0/2] wifi: ath12k: Introduce hw abstraction 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=8734ux78sj.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_periyasa@quicinc.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).