From: Bing Zhao <bzhao@marvell.com>
To: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>,
Amitkumar Karwar <akarwar@marvell.com>,
Kiran Divekar <dkiran@marvell.com>,
Yogesh Powar <yogeshp@marvell.com>,
Marc Yang <yangyang@marvell.com>,
Frank Huang <frankh@marvell.com>, Bing Zhao <bzhao@marvell.com>
Subject: [PATCH 5/5] mwifiex: adjust high/low water marks for tx_pending queue
Date: Mon, 16 May 2011 19:17:53 -0700 [thread overview]
Message-ID: <1305598673-26606-6-git-send-email-bzhao@marvell.com> (raw)
In-Reply-To: <1305598673-26606-1-git-send-email-bzhao@marvell.com>
From: Marc Yang <yangyang@marvell.com>
This is to fix an issue that the throughput of the higher priority
stream gets dropped when a lower priority stream is present.
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
drivers/net/wireless/mwifiex/main.h | 3 ++-
drivers/net/wireless/mwifiex/txrx.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 3154b0a..8316b3c 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -69,7 +69,8 @@ struct mwifiex_drv_mode {
#define MWIFIEX_TIMER_10S 10000
#define MWIFIEX_TIMER_1S 1000
-#define MAX_TX_PENDING 60
+#define MAX_TX_PENDING 100
+#define LOW_TX_PENDING 80
#define MWIFIEX_UPLD_SIZE (2312)
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c
index 2101208..aaa50c0 100644
--- a/drivers/net/wireless/mwifiex/txrx.c
+++ b/drivers/net/wireless/mwifiex/txrx.c
@@ -140,7 +140,9 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
} else {
priv->stats.tx_errors++;
}
- atomic_dec(&adapter->tx_pending);
+
+ if (atomic_dec_return(&adapter->tx_pending) >= LOW_TX_PENDING)
+ goto done;
for (i = 0; i < adapter->priv_num; i++) {
--
1.7.0.2
prev parent reply other threads:[~2011-05-17 2:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 2:17 [PATCH 0/5] mwifiex: CPU mips optimization patch series Bing Zhao
2011-05-17 2:17 ` [PATCH 1/5] mwifiex: reduce CPU usage by tracking tx_pkts_queued Bing Zhao
2011-05-17 2:17 ` [PATCH 2/5] mwifiex: reduce CPU usage by tracking highest_queued_prio Bing Zhao
2011-05-17 2:17 ` [PATCH 3/5] mwifiex: check mwifiex_wmm_lists_empty() before dequeue Bing Zhao
2011-05-17 2:17 ` [PATCH 4/5] mwifiex: CPU mips optimization with NO_PKT_PRIO_TID Bing Zhao
2011-05-17 2:17 ` Bing Zhao [this message]
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=1305598673-26606-6-git-send-email-bzhao@marvell.com \
--to=bzhao@marvell.com \
--cc=akarwar@marvell.com \
--cc=dkiran@marvell.com \
--cc=frankh@marvell.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yangyang@marvell.com \
--cc=yogeshp@marvell.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 NNTP newsgroup(s).