Skip to content

Commit

Permalink
pkt_sched: Add queue stopped test back to qdisc_run().
Browse files Browse the repository at this point in the history
Based upon a bug report by Andrew Gallatin on netdev
with subject "CPU utilization increased in 2.6.27rc"

In commit 37437bb
("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>
  • Loading branch information
David S. Miller committed Aug 13, 2008
1 parent 5e0115e commit 83f36f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/net/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ extern void __qdisc_run(struct Qdisc *q);

static inline void qdisc_run(struct Qdisc *q)
{
if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
struct netdev_queue *txq = q->dev_queue;

if (!netif_tx_queue_stopped(txq) &&
!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
__qdisc_run(q);
}

Expand Down

0 comments on commit 83f36f3

Please sign in to comment.