Re: NMI lockup, 2.6.26 release

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jarek Poplawski
Date: Wednesday, July 23, 2008 - 2:09 pm

On Wed, Jul 23, 2008 at 10:47:17PM +0300, denys@visp.net.lb wrote:

It's a pity! On the other hand it looks like you have something really
special...

But, since all these reports stop at hrtimers, my proposal is to check 
where it could hit without them. I attach a patch for debugging, which
turns back a timer instead of hrtimer watchdog. Alas I didn't test it,
so be cautious. (This should work with 2.6.26 or .25, I hope.)

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 /
+				 PSCHED_TICKS_PER_SEC * HZ);
 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
NMI lockup, 2.6.26 release, denys, (Tue Jul 22, 11:42 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Tue Jul 22, 1:13 pm)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Tue Jul 22, 1:35 pm)
Re: NMI lockup, 2.6.26 release, denys, (Tue Jul 22, 1:46 pm)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Tue Jul 22, 2:36 pm)
Re: NMI lockup, 2.6.26 release, denys, (Tue Jul 22, 2:45 pm)
Re: NMI lockup, 2.6.26 release, denys, (Wed Jul 23, 12:47 pm)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Wed Jul 23, 2:09 pm)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Wed Jul 23, 3:26 pm)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Wed Jul 23, 4:24 pm)
Re: NMI lockup, 2.6.26 release, denys, (Wed Jul 23, 4:56 pm)
Re: NMI lockup, 2.6.26 release, denys, (Thu Jul 24, 7:56 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Thu Jul 24, 10:45 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Fri Jul 25, 12:36 am)
Re: NMI lockup, 2.6.26 release, denys, (Fri Jul 25, 2:09 pm)
hrtimers lockups Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Fri Jul 25, 3:31 pm)
Re: NMI lockup, 2.6.26 release, Denys Fedoryshchenko, (Sat Aug 2, 5:55 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Sat Aug 2, 6:07 am)
Re: NMI lockup, 2.6.26 release, Denys Fedoryshchenko, (Tue Aug 12, 4:31 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Tue Aug 12, 5:40 am)
Re: NMI lockup, 2.6.26 release, Denys Fedoryshchenko, (Wed Aug 13, 12:28 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Wed Aug 13, 12:43 am)
Re: NMI lockup, 2.6.26 release, Denys Fedoryshchenko, (Wed Aug 13, 1:02 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Wed Aug 13, 1:49 am)
Re: NMI lockup, 2.6.26 release, Denys Fedoryshchenko, (Wed Aug 13, 2:08 am)
Re: NMI lockup, 2.6.26 release, Denys Fedoryshchenko, (Thu Aug 14, 8:07 am)
New: softlockup in 2.6.27-rc3-git2, Denys Fedoryshchenko, (Thu Aug 14, 8:10 am)
Re: NMI lockup, 2.6.26 release, Denys Fedoryshchenko, (Fri Aug 15, 6:13 am)
Re: NMI lockup, 2.6.26 release, Jarek Poplawski, (Fri Aug 15, 7:16 am)