aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-13 05:13:34 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-13 05:13:34 -0400
commit83f36f3f35f4f83fa346bfff58a5deabc78370e5 (patch)
tree6e3c252967f33b76a60585c2702878c153649fbc /include/net
parent5e0115e500fe9dd2ca11e6f92db9123204f1327a (diff)
pkt_sched: Add queue stopped test back to qdisc_run().
Based upon a bug report by Andrew Gallatin on netdev with subject "CPU utilization increased in 2.6.27rc" In commit 37437bb2e1ae8af470dfcd5b4ff454110894ccaf ("pkt_sched: Schedule qdiscs instead of netdev_queue.") the test of the queue being stopped was erroneously removed from qdisc_run(). When the TX queue of the device fills up, this omission causes lots of extraneous useless work to be queued up to softirq context, where we'll just return immediately because the device is still stuffed up. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/pkt_sched.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 6affcfaa123..853fe83d9f3 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -89,7 +89,10 @@ extern void __qdisc_run(struct Qdisc *q);
89 89
90static inline void qdisc_run(struct Qdisc *q) 90static inline void qdisc_run(struct Qdisc *q)
91{ 91{
92 if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) 92 struct netdev_queue *txq = q->dev_queue;
93
94 if (!netif_tx_queue_stopped(txq) &&
95 !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
93 __qdisc_run(q); 96 __qdisc_run(q);
94} 97}
95 98