]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 22:56:32 +0000 (14:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 22:56:32 +0000 (14:56 -0800)
added patches:
rt2800usb-slow-down-tx-status-polling.patch

queue-3.4/rt2800usb-slow-down-tx-status-polling.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/rt2800usb-slow-down-tx-status-polling.patch b/queue-3.4/rt2800usb-slow-down-tx-status-polling.patch
new file mode 100644 (file)
index 0000000..700df74
--- /dev/null
@@ -0,0 +1,71 @@
+From 36165fd5b00bf8163f89c21bb16a3e9834555b10 Mon Sep 17 00:00:00 2001
+From: Stanislaw Gruszka <sgruszka@redhat.com>
+Date: Fri, 18 Oct 2013 11:36:54 +0200
+Subject: rt2800usb: slow down TX status polling
+
+From: Stanislaw Gruszka <sgruszka@redhat.com>
+
+commit 36165fd5b00bf8163f89c21bb16a3e9834555b10 upstream.
+
+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
+
+Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rt2x00/rt2800usb.c |   12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/wireless/rt2x00/rt2800usb.c
++++ b/drivers/net/wireless/rt2x00/rt2800usb.c
+@@ -143,6 +143,8 @@ static bool rt2800usb_txstatus_timeout(s
+       return false;
+ }
++#define TXSTATUS_READ_INTERVAL 1000000
++
+ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,
+                                                int urb_status, u32 tx_status)
+ {
+@@ -170,8 +172,9 @@ static bool rt2800usb_tx_sta_fifo_read_c
+               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, TXSTATUS_READ_INTERVAL),
+                             HRTIMER_MODE_REL);
+               return false;
+       }
+@@ -196,8 +199,9 @@ static void rt2800usb_async_read_tx_stat
+       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, 2*TXSTATUS_READ_INTERVAL),
+                     HRTIMER_MODE_REL);
+ }
index 4a1ea3fef685149b74e81c2b77f6b3d7b4774587..9b73f109f029687e90aa346643490fa9f3441973 100644 (file)
@@ -34,3 +34,4 @@ powerpc-vio-use-strcpy-in-modalias_show.patch
 powerpc-powernv-add-pe-to-its-own-peltv.patch
 powerpc-signals-mark-vsx-not-saved-with-small-contexts.patch
 sunrpc-fix-a-data-corruption-issue-when-retransmitting-rpc-calls.patch
+rt2800usb-slow-down-tx-status-polling.patch