Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp417836rdb; Tue, 16 Jan 2024 04:38:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHluGVWLEMYvWr5lmifJReVgJgMQYL4FDBJbitQikk5bqHFjUyY+lPNNqLWu27u5B5I5RMv X-Received: by 2002:a05:6a21:a583:b0:19a:37be:1af9 with SMTP id gd3-20020a056a21a58300b0019a37be1af9mr10027267pzc.43.1705408706942; Tue, 16 Jan 2024 04:38:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705408706; cv=none; d=google.com; s=arc-20160816; b=lFOHtxXmOTZN8D95ijoAa4VVYMW7FIcMPFlktgQn7jkXxGhzfgQVPW4kNK1RNcGAQw w8JIFXD66yGex6v0WYMM9Ym3LGBTF9yxJ1OGwCXLre6AxZadrtyneCC6Jpzds6+1I1RA 2YAdTC4T7khWuyzxxuSUtaC2UgzBEn+2wEcYFNzVwbpZXjVRhynSV5OmEJLmwQBoK4HI QvMzy9mh8rHBcM3tdbB2zTisw5S4lCQ+UnNsEpgBBKnZ3wGJHgsCVu4WYxZJ0/p2RC7V YLBuIYjbu7BNl0Y4Yx5KZgOicbE8Lud5Acc/q4n47qBEkeCT1PCu7g0BrTwICnjyL5rX /Cwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=4b6BMc7fZmJ4185Kw0xL6C2oGPav/1Fiwy/4RjwKke4=; fh=gNywOoGH9FiEKkqPngRyqJ0mvecwQizKE+QEYR6/Bdw=; b=jBTnUo1DubV6oMIIcptcSEeVMfbq/GrQ5cKR/U2LZsFAVQROXmFo2V/rVmn03FxlzY XqlqtkJCnWontQ78sjywqTaosglkdL8nhG/+/1qShyK+H0m2segnXpVrR9nppeSGJmBP 5M1xsBjMeFaL99El71M6mSqY1KgXgi6wwcqu0qqbvTGi/86ZfNbr/V+ZBElgYHp0ZgdR 2Ps95eNlPG7a1E9ae8WMAxinLaXSOdAFjTu8a70/iSE1RQ5/+AoZiZntqUICRX8UcIev IPNRdzRrWrIyrwdSafxG2239LDuA1MwQ4IrLcUUe1Eg7APAiJcdzoo7z2lMrsx3P7QO/ /VOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="aE/VGly+"; spf=pass (google.com: domain of linux-wireless+bounces-1978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i8-20020a632208000000b005ce03d1e9fasi11349356pgi.870.2024.01.16.04.38.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 04:38:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="aE/VGly+"; spf=pass (google.com: domain of linux-wireless+bounces-1978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4DE02285C1B for ; Tue, 16 Jan 2024 12:38:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 479A51BC26; Tue, 16 Jan 2024 12:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aE/VGly+" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E4ED1BC23 for ; Tue, 16 Jan 2024 12:38:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E566DC433F1; Tue, 16 Jan 2024 12:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705408702; bh=S6/7lJVC6JILhB6Z5JfqKG7z1YHe5+sb8EPCR03iwBs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=aE/VGly+K3q+TUPcQbNjHu8JrOeStWaF4fmKAnKbgeqDpTmd423cR7Vrjp/awL9cn opI8mPB7NZ792DQSu1vdkx9lobIhLLDQKP3HEYnj76kO4zTbMmv0KfKJGCh/JocS4E mO/cm7SFhLDAv+r94GfMyOXY/lsJ0TJ7o3Qu8qyPl+hxipzAON2xr9S8GdxoWsGqUL qVHRfE2pJyETPDAro5zInLDfOyhJ8n2Qek//HsOZyhiqetgBZI55gh395snFept1bc vTETg3R+K9lFv7teut9KiFUrk6fN+RupQm+spZ1Yw3Gu+trd7T8bUK5GMWPhkc4m7f Xdl7xNFt3eZxw== From: Kalle Valo To: Karthikeyan Periyasamy Cc: , Subject: Re: [PATCH v2 2/2] wifi: ath12k: Introduce the container for mac80211 hw References: <20240112024214.3481840-1-quic_periyasa@quicinc.com> <20240112024214.3481840-3-quic_periyasa@quicinc.com> <87bk9m7f5g.fsf@kernel.org> <839b56fa-9ce8-47f3-768d-b4f32a2041f1@quicinc.com> Date: Tue, 16 Jan 2024 14:38:20 +0200 In-Reply-To: <839b56fa-9ce8-47f3-768d-b4f32a2041f1@quicinc.com> (Karthikeyan Periyasamy's message of "Tue, 16 Jan 2024 10:44:46 +0530") Message-ID: <8734ux78sj.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Karthikeyan Periyasamy 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