From: Jan Kiszka <jan.kiszka@web.de>
To: Christian Lamparter <chunkeey@googlemail.com>
Cc: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH 2/5] ar9170: improve network latency
Date: Sun, 06 Dec 2009 19:16:31 +0100 [thread overview]
Message-ID: <4B1BF4FF.2040707@web.de> (raw)
In-Reply-To: <200911290052.51819.chunkeey@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 2983 bytes --]
Christian Lamparter wrote:
> AR9170 has the bad habit of choking when traffic builds up.
> Tests have shown that this can partially be attributed to
> a huge buildup of backlogged frames.
>
> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> ---
> low priority.
I disagree about this classification. :)
I'm running your series for two days now on my ar9170-based AP, and
obviously this patch improved the "chokiness" under suboptimal reception
conditions greatly. No regressions noticed so far. Please merge.
Thanks a lot,
Jan
> ---
> diff --git a/drivers/net/wireless/ath/ar9170/ar9170.h b/drivers/net/wireless/ath/ar9170/ar9170.h
> index d95a7d4..44c54b8 100644
> --- a/drivers/net/wireless/ath/ar9170/ar9170.h
> +++ b/drivers/net/wireless/ath/ar9170/ar9170.h
> @@ -152,6 +152,8 @@ struct ar9170_sta_tid {
>
> #define AR9170_NUM_TX_STATUS 128
> #define AR9170_NUM_TX_AGG_MAX 30
> +#define AR9170_NUM_TX_LIMIT_HARD AR9170_TXQ_DEPTH
> +#define AR9170_NUM_TX_LIMIT_SOFT (AR9170_TXQ_DEPTH - 10)
>
> struct ar9170 {
> struct ieee80211_hw *hw;
> diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
> index cbf59b1..3cec2f1 100644
> --- a/drivers/net/wireless/ath/ar9170/main.c
> +++ b/drivers/net/wireless/ath/ar9170/main.c
> @@ -430,7 +430,7 @@ void ar9170_tx_callback(struct ar9170 *ar, struct sk_buff *skb)
> spin_lock_irqsave(&ar->tx_stats_lock, flags);
> ar->tx_stats[queue].len--;
>
> - if (skb_queue_empty(&ar->tx_pending[queue])) {
> + if (ar->tx_stats[queue].len < AR9170_NUM_TX_LIMIT_SOFT) {
> #ifdef AR9170_QUEUE_STOP_DEBUG
> printk(KERN_DEBUG "%s: wake queue %d\n",
> wiphy_name(ar->hw->wiphy), queue);
> @@ -1716,6 +1716,21 @@ static void ar9170_tx(struct ar9170 *ar)
>
> for (i = 0; i < __AR9170_NUM_TXQ; i++) {
> spin_lock_irqsave(&ar->tx_stats_lock, flags);
> + frames = min(ar->tx_stats[i].limit - ar->tx_stats[i].len,
> + skb_queue_len(&ar->tx_pending[i]));
> +
> + if (remaining_space < frames) {
> +#ifdef AR9170_QUEUE_DEBUG
> + printk(KERN_DEBUG "%s: tx quota reached queue:%d, "
> + "remaining slots:%d, needed:%d\n",
> + wiphy_name(ar->hw->wiphy), i, remaining_space,
> + frames);
> +#endif /* AR9170_QUEUE_DEBUG */
> + frames = remaining_space;
> + }
> +
> + ar->tx_stats[i].len += frames;
> + ar->tx_stats[i].count += frames;
> if (ar->tx_stats[i].len >= ar->tx_stats[i].limit) {
> #ifdef AR9170_QUEUE_DEBUG
> printk(KERN_DEBUG "%s: queue %d full\n",
> @@ -1733,25 +1748,8 @@ static void ar9170_tx(struct ar9170 *ar)
> __ar9170_dump_txstats(ar);
> #endif /* AR9170_QUEUE_STOP_DEBUG */
> ieee80211_stop_queue(ar->hw, i);
> - spin_unlock_irqrestore(&ar->tx_stats_lock, flags);
> - continue;
> - }
> -
> - frames = min(ar->tx_stats[i].limit - ar->tx_stats[i].len,
> - skb_queue_len(&ar->tx_pending[i]));
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
prev parent reply other threads:[~2009-12-06 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-28 23:52 [PATCH 2/5] ar9170: improve network latency Christian Lamparter
2009-12-06 18:16 ` Jan Kiszka [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=4B1BF4FF.2040707@web.de \
--to=jan.kiszka@web.de \
--cc=chunkeey@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.