Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1936502d00ae6c2aa3931c42f6cf54afaba094f2
Commit:     1936502d00ae6c2aa3931c42f6cf54afaba094f2
Parent:     11274e5a43266d531140530adebead6903380caf
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 22 12:18:35 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:23 2007 -0700

    [NET_SCHED] qdisc: avoid transmit softirq on watchdog wakeup
    
    If possible, avoid having to do a transmit softirq when a qdisc
    watchdog decides to re-enable.  The watchdog routine runs off
    a timer, so it is already in the same effective context as
    the softirq.
    
    Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sched/sch_api.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index fcaa4ad..5873250 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -296,10 +296,16 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer 
*timer)
 {
        struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog,
                                                 timer);
+       struct net_device *dev = wd->qdisc->dev;
 
        wd->qdisc->flags &= ~TCQ_F_THROTTLED;
        smp_wmb();
-       netif_schedule(wd->qdisc->dev);
+       if (spin_trylock(&dev->queue_lock)) {
+               qdisc_run(dev);
+               spin_unlock(&dev->queue_lock);
+       } else
+               netif_schedule(dev);
+
        return HRTIMER_NORESTART;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to