From: Larry Finger <Larry.Finger@lwfinger.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>, linux-wireless@vger.kernel.org
Cc: users@rt2x00.serialmonkey.com
Subject: Re: [PATCH 3.12] rt2800usb: slow down TX status polling
Date: Thu, 17 Oct 2013 09:39:06 -0500 [thread overview]
Message-ID: <525FF68A.8030806@lwfinger.net> (raw)
In-Reply-To: <20131017100431.GA9603@redhat.com>
On 10/17/2013 05:04 AM, Stanislaw Gruszka wrote:
> Polling TX statuses too frequently has two negative effects. First is
> randomly peek CPU usage, causing overall system functioning delays.
> Second bad effect is that device is not able to fill TX statuses in
> H/W register on some workloads and we get lot of timeouts like below:
>
> ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2
> ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2
> ieee80211 phy4: rt2800usb_txdone: Warning - Got TX status for an empty queue 2, dropping
>
> This not only cause flood of messages in dmesg, but also bad throughput,
> since rate scaling algorithm can not work optimally.
>
> In the future, we should probably make polling interval be adjusted
> automatically, but for now just increase values, this make mentioned
> problems gone.
>
> Resolve:
> https://bugzilla.kernel.org/show_bug.cgi?id=62781
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/rt2x00/rt2800usb.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index 96677ce5..e095e61 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -176,8 +176,8 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,
> queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
>
> if (rt2800usb_txstatus_pending(rt2x00dev)) {
> - /* Read register after 250 us */
> - hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000),
> + /* Read register after 1 ms */
> + hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 1000000),
> HRTIMER_MODE_REL);
> return false;
> }
> @@ -202,8 +202,8 @@ static void rt2800usb_async_read_tx_status(struct rt2x00_dev *rt2x00dev)
> if (test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
> return;
>
> - /* Read TX_STA_FIFO register after 500 us */
> - hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 500000),
> + /* Read TX_STA_FIFO register after 2 ms */
> + hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 2000000),
> HRTIMER_MODE_REL);
> }
I suggest getting rid of the magic numbers as long as you are making this
change. A single define could handle the delay time for the two cases.
Larry
next prev parent reply other threads:[~2013-10-17 14:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 10:04 [PATCH 3.12] rt2800usb: slow down TX status polling Stanislaw Gruszka
2013-10-17 14:39 ` Larry Finger [this message]
2013-10-18 9:42 ` Stanislaw Gruszka
2013-10-19 8:33 ` Gertjan van Wingerde
2013-11-20 12:53 ` [rt2x00-users] [PATCH 3.12] rt2800usb: slow down TX statuspolling Marc Dietrich
2013-11-20 14:12 ` Stanislaw Gruszka
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=525FF68A.8030806@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=sgruszka@redhat.com \
--cc=users@rt2x00.serialmonkey.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.