netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Enrico Demarin <enrico@superclick.com>
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: Re: HTB and ingress scheduler SMP Soft Lockup in 2.6.23-2.6.25-rc8
Date: Sun, 13 Apr 2008 14:10:31 +0200	[thread overview]
Message-ID: <20080413121031.GA5211@ami.dom.local> (raw)
In-Reply-To: <47FFAFFA.7070802@superclick.com>

Enrico Demarin wrote, On 04/11/2008 08:37 PM:

> Hi everyone,
> 
> I stumbled by chance in a deadlock condition using HTB and the ingress 
> scheduler at the same time.
> 
> - The bug seems to have been introduced in 2.6.23 and forward ( 2.6.22 
> works fine )
> - Tested up to  2.6.25-rc8
> 
> I found a temporary workaround  ( the ingress didnt have a reason to be 
> there in first place , just omitting it from the script avoids the 
> condition ), but it would be nice to have a proper fix. Let me know if 
> more data/testing is needed.

Hi,

It's a very nice test and results, but alas I don't have 3 boxes
around, so I wonder if you could try this debugging patch below?

I think one of possible reasons could be a qdisc with the same
handle and parent ids, like ingress, but I can't see how it could
be referenced by your htb classes yet...

Thanks,
Jarek P.

---

 net/sched/sch_api.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 15b91a9..de52b17 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -386,11 +386,18 @@ void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
 	if (n == 0)
 		return;
 	while ((parentid = sch->parent)) {
+		struct Qdisc *sch_old = sch;
+
 		sch = qdisc_lookup(sch->dev, TC_H_MAJ(parentid));
 		if (sch == NULL) {
 			WARN_ON(parentid != TC_H_ROOT);
 			return;
 		}
+		if (sch == sch_old) {
+			printk("qdisc loop: %p, %x\n", sch, sch->parent);
+			return;
+		}
+
 		cops = sch->ops->cl_ops;
 		if (cops->qlen_notify) {
 			cl = cops->get(sch, parentid);

  parent reply	other threads:[~2008-04-13 12:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 18:37 HTB and ingress scheduler SMP Soft Lockup in 2.6.23-2.6.25-rc8 Enrico Demarin
2008-04-13  7:51 ` Patrick McHardy
2008-04-13 19:20   ` Enrico Demarin
2008-04-14  7:14     ` Patrick McHardy
2008-04-14  7:15       ` Patrick McHardy
2008-04-14  7:20         ` Patrick McHardy
2008-04-14  7:51     ` Patrick McHardy
2008-04-13 12:10 ` Jarek Poplawski [this message]
2008-04-14 20:26   ` [PATCH][NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop Jarek Poplawski
2008-04-14 20:28     ` Patrick McHardy
2008-04-14 22:11       ` David Miller
2008-04-15  5:32         ` Jarek Poplawski
2008-04-15 12:37           ` Patrick McHardy
2008-04-15 13:00             ` Jarek Poplawski
2008-04-15 13:09               ` Patrick McHardy
2008-04-15 13:10                 ` Patrick McHardy
2008-04-15 17:41                 ` Jarek Poplawski
2008-04-15 18:25                   ` Jarek Poplawski
2008-04-15 19:29                     ` 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=20080413121031.GA5211@ami.dom.local \
    --to=jarkao2@gmail.com \
    --cc=enrico@superclick.com \
    --cc=kaber@trash.net \
    --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).