Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3589376ybl; Sun, 25 Aug 2019 19:45:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcwaWZ5tQW9ot1kguLBlUAf0b+b0goS0pT1OaUB5W+Yd9fWcWQGE5ai1gQQhsFpo8QS/oa X-Received: by 2002:a17:902:a507:: with SMTP id s7mr16068303plq.66.1566787553427; Sun, 25 Aug 2019 19:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566787553; cv=none; d=google.com; s=arc-20160816; b=fQwHozQs8QsFQGxl/soZNXlEZIF9TBrXUPFggoVkqC2u7LwwO3Lh94shA9o5fgbbLz G3RZ+f7TYx3pgGKFNYh/+LRGriaPj/YyEvbL3WGaNRdMsassyKomMYu+jy7TO8c+oCx4 aKc0NOJeN5t3+FZghU8PmJXRK8iDoLfL5JgIQiGymUneigak6C5cf4W48AT/b/TRtaVp 6VCZwHOaEJbboxJcmpneYCcq+hJGsmFvIhX6O76omxBW9ppjbV8A4bk6iTfji8J00Kxa lzeo7jHfd6nA4f1iruUt7H+z5oLsQoaG9S2bNb96C+MWEgUWFQHXyRbLzbrKcQGViT0x q/0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:to:from:thread-topic:subject:dkim-signature; bh=BzEFt8b9wy/Vl7PDQctKswOFZmk7CSwMUpyH2Io/PEM=; b=EMHomGpMG262JQ0p1baSQZ9HcEGaz9KF5Thy5BXc3JCHnmDgrDStIsseLQXxyo9bMg A1+6KNdHRH3rNrBWx460kqXxUTpL8udEI/WvOSclQxWSWDlH/3u8eXmNo6nIBjvUKUSg 5tIUbKreIHaSn18QLMn3TE+f8snzqRs5MtNuTY3ttHQ8CvAn0foDzMl9tL7brEO8j5HP wuYB+IRx3jBhSKX7UozVdYQgPBnE9ENQEE8zBsS9xwtYzIrkQlGoF1KJBZFyt4BioeNV 5dXxMEZ8gYiGhcsgyjtwG3EwYAe/voi2Oh257Ueg4atNGq2xVTAoQYolOal1KACeu9pu 70ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@qti.qualcomm.com header.s=qcdkim header.b=mC9FquS1; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si8163680pjs.62.2019.08.25.19.45.25; Sun, 25 Aug 2019 19:45:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@qti.qualcomm.com header.s=qcdkim header.b=mC9FquS1; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729222AbfHZCop (ORCPT + 99 others); Sun, 25 Aug 2019 22:44:45 -0400 Received: from alexa-out-tai-02.qualcomm.com ([103.229.16.227]:59744 "EHLO alexa-out-tai-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729217AbfHZCop (ORCPT ); Sun, 25 Aug 2019 22:44:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1566787484; x=1598323484; h=from:to:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:subject; bh=BzEFt8b9wy/Vl7PDQctKswOFZmk7CSwMUpyH2Io/PEM=; b=mC9FquS1MrKXCOkAJdtwabZjljYqu0d0mWF5YaeSkkifxXsOReZFDC/u iMZ+5yiHSMeEELb61QGXTUdyc60h3L3dOHlsD+LGgcdWXJcn+alxlDAX1 j6Aaj+W1B6Z0cuIImozzOAq0xXVAE6Sn+S45W3VqCFJ5duJxIFV+aQ4Fd c=; Subject: RE: [PATCH] ath10k: remove TX lock from ath10k_htt_tx_inc_pending Thread-Topic: [PATCH] ath10k: remove TX lock from ath10k_htt_tx_inc_pending Received: from ironmsg01-tai.qualcomm.com ([10.249.140.6]) by alexa-out-tai-02.qualcomm.com with ESMTP; 26 Aug 2019 10:44:43 +0800 Received: from aptaiexm02a.ap.qualcomm.com ([10.249.150.11]) by ironmsg01-tai.qualcomm.com with ESMTP/TLS/AES256-SHA; 26 Aug 2019 10:44:39 +0800 Received: from aptaiexm02f.ap.qualcomm.com (10.249.150.16) by aptaiexm02a.ap.qualcomm.com (10.249.150.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 26 Aug 2019 10:44:37 +0800 Received: from aptaiexm02f.ap.qualcomm.com ([fe80::4152:1436:e436:faa1]) by aptaiexm02f.ap.qualcomm.com ([fe80::4152:1436:e436:faa1%19]) with mapi id 15.00.1473.005; Mon, 26 Aug 2019 10:44:37 +0800 From: Wen Gong To: Erik Stromdahl , Kalle Valo , "linux-wireless@vger.kernel.org" , "ath10k@lists.infradead.org" Thread-Index: AQHVWoLUu0EcF57GtkCF/PdkQDEHWacMuQEQ Date: Mon, 26 Aug 2019 02:44:37 +0000 Message-ID: <4cd30880ae754f5599e6b1a4c1ac6a74@aptaiexm02f.ap.qualcomm.com> References: <20190824134857.4094-1-erik.stromdahl@gmail.com> In-Reply-To: <20190824134857.4094-1-erik.stromdahl@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.249.136.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: ath10k On Behalf Of Erik > Stromdahl > Sent: Saturday, August 24, 2019 9:49 PM > To: Kalle Valo ; linux-wireless@vger.kernel.org; > ath10k@lists.infradead.org > Cc: Erik Stromdahl > Subject: [EXT] [PATCH] ath10k: remove TX lock from > ath10k_htt_tx_inc_pending >=20 > This commit removes the call to ath10k_mac_tx_lock() from > ath10k_htt_tx_inc_pending() in case the high water mark is reached. >=20 > ath10k_mac_tx_lock() calls ieee80211_stop_queues() in order to stop > mac80211 from pushing more TX data to the driver (this is the TX lock). >=20 > If a driver is trying to fetch an skb from a queue while the queue is > stopped, ieee80211_tx_dequeue() will return NULL. >=20 > So, in ath10k_mac_tx_push_txq(), there is a risk that the call to > ath10k_htt_tx_inc_pending() results in a stop of the mac80211 TX queues > just before the skb is fetched. >=20 > This will cause ieee80211_tx_dequeue() to return NULL and > ath10k_mac_tx_push_txq() to exit prematurely and return -ENOENT. > Before the function returns ath10k_htt_tx_dec_pending() will be called. > This call will re-enable the TX queues through ath10k_mac_tx_unlock(). > When ath10k_mac_tx_push_txq() has returned, the TX queue will be > returned back to mac80211 with ieee80211_return_txq() without the skb > being properly consumed. >=20 > Since the TX queues were re-enabled in the error exit path of > ath10k_mac_tx_push_txq(), mac80211 can continue pushing data to the > driver. If the hardware does not consume the data, the above mentioned > case will be repeated over and over. >=20 > A case when the hardware is not able to transmit the data from the host > is when a STA has been dis-associated from an AP and has not yet been > able to re-associate. In this case there will be no TX_COMPL_INDs from > the hardware, resulting in the TX counter not be decremented. >=20 > This phenomenon has been observed in both a real and a test setup. >=20 > In order to fix this, the actual TX locking (the call to > ath10k_mac_tx_lock()) was removed from ath10k_htt_tx_inc_pending(). > Instead, ath10k_mac_tx_lock() is called separately after the skb has > been fetched (after the call to ieee80211_tx_dequeue()). At this point > it is OK to stop the queues. Is this patch will impact throughput? >=20 >=20 > _______________________________________________ > ath10k mailing list > ath10k@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/ath10k