From: Jarek Poplawski <jarkao2@gmail.com>
To: denys@visp.net.lb
Cc: netdev@vger.kernel.org
Subject: Re: NMI lockup, 2.6.26 release
Date: Thu, 24 Jul 2008 00:26:32 +0200 [thread overview]
Message-ID: <20080723222631.GA2397@ami.dom.local> (raw)
In-Reply-To: <200807232247.17218.denys@visp.net.lb>
(take 2)
Hmm... this should be more accurate.
Jarek P.
---
net/sched/sch_htb.c | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 3fb58f4..fdc84c3 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -169,7 +169,8 @@ struct htb_sched {
int rate2quantum; /* quant = rate / rate2quantum */
psched_time_t now; /* cached dequeue time */
- struct qdisc_watchdog watchdog;
+ //struct qdisc_watchdog watchdog;
+ struct timer_list timer; /* send delay timer */
/* non shaped skbs; let them go directly thru */
struct sk_buff_head direct_queue;
@@ -893,6 +894,14 @@ next:
return skb;
}
+static void htb_timer(unsigned long arg)
+{
+ struct Qdisc *sch = (struct Qdisc*)arg;
+ sch->flags &= ~TCQ_F_THROTTLED;
+ wmb();
+ netif_schedule(sch->dev);
+}
+
static struct sk_buff *htb_dequeue(struct Qdisc *sch)
{
struct sk_buff *skb = NULL;
@@ -943,7 +952,9 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
}
}
sch->qstats.overlimits++;
- qdisc_watchdog_schedule(&q->watchdog, next_event);
+ //qdisc_watchdog_schedule(&q->watchdog, next_event);
+ mod_timer(&q->timer, (unsigned long)next_event * HZ /
+ PSCHED_TICKS_PER_SEC);
fin:
return skb;
}
@@ -996,7 +1007,9 @@ static void htb_reset(struct Qdisc *sch)
}
}
- qdisc_watchdog_cancel(&q->watchdog);
+ //qdisc_watchdog_cancel(&q->watchdog);
+ sch->flags &= ~TCQ_F_THROTTLED;
+ del_timer(&q->timer);
__skb_queue_purge(&q->direct_queue);
sch->q.qlen = 0;
memset(q->row, 0, sizeof(q->row));
@@ -1047,7 +1060,11 @@ static int htb_init(struct Qdisc *sch, struct nlattr *opt)
for (i = 0; i < TC_HTB_NUMPRIO; i++)
INIT_LIST_HEAD(q->drops + i);
- qdisc_watchdog_init(&q->watchdog, sch);
+ //qdisc_watchdog_init(&q->watchdog, sch);
+ q->timer.function = htb_timer;
+ q->timer.data = (unsigned long)sch;
+ init_timer(&q->timer);
+
skb_queue_head_init(&q->direct_queue);
q->direct_qlen = sch->dev->tx_queue_len;
@@ -1262,7 +1279,8 @@ static void htb_destroy(struct Qdisc *sch)
{
struct htb_sched *q = qdisc_priv(sch);
- qdisc_watchdog_cancel(&q->watchdog);
+ //qdisc_watchdog_cancel(&q->watchdog);
+ del_timer_sync(&q->timer);
/* This line used to be after htb_destroy_class call below
and surprisingly it worked in 2.4. But it must precede it
because filter need its target class alive to be able to call
next prev parent reply other threads:[~2008-07-23 22:27 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 18:42 NMI lockup, 2.6.26 release denys
2008-07-22 20:13 ` Jarek Poplawski
2008-07-22 20:35 ` Jarek Poplawski
2008-07-22 20:46 ` denys
2008-07-22 21:36 ` Jarek Poplawski
2008-07-22 21:45 ` denys
2008-07-23 19:47 ` denys
2008-07-23 21:09 ` Jarek Poplawski
2008-07-23 22:26 ` Jarek Poplawski [this message]
2008-07-23 23:24 ` Jarek Poplawski
2008-07-23 23:56 ` denys
2008-07-24 14:56 ` denys
2008-07-24 17:45 ` Jarek Poplawski
2008-07-25 7:36 ` Jarek Poplawski
2008-07-25 21:09 ` denys
2008-07-25 22:31 ` hrtimers lockups " Jarek Poplawski
2008-08-02 12:55 ` Denys Fedoryshchenko
2008-08-02 13:07 ` Jarek Poplawski
2008-08-12 11:31 ` Denys Fedoryshchenko
2008-08-12 12:40 ` Jarek Poplawski
2008-08-13 7:28 ` Denys Fedoryshchenko
2008-08-13 7:43 ` Jarek Poplawski
2008-08-13 8:02 ` Denys Fedoryshchenko
2008-08-13 8:49 ` Jarek Poplawski
2008-08-13 9:08 ` Denys Fedoryshchenko
2008-08-14 15:07 ` Denys Fedoryshchenko
2008-08-14 15:10 ` New: softlockup in 2.6.27-rc3-git2 Denys Fedoryshchenko
2008-08-15 13:13 ` NMI lockup, 2.6.26 release Denys Fedoryshchenko
2008-08-15 14:16 ` Jarek Poplawski
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=20080723222631.GA2397@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=denys@visp.net.lb \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).