From: Jarek Poplawski <jarkao2@gmail.com>
To: Denys Fedoryshchenko <denys@visp.net.lb>
Cc: netdev@vger.kernel.org
Subject: Re: panic 2.6.27-rc3-git2, qdisc_dequeue_head
Date: Sun, 17 Aug 2008 12:55:34 +0200 [thread overview]
Message-ID: <20080817105534.GD2907@ami.dom.local> (raw)
In-Reply-To: <200808171301.56002.denys@visp.net.lb>
On Sun, Aug 17, 2008 at 01:01:55PM +0300, Denys Fedoryshchenko wrote:
> Ok, now things finally organized.
> fixing patch #1 was missing.
>
> Rebooting system to this kernel. But strange thing, without fixing patch #1 it
> didn't crash for whole night, and 1-3 hours now (with same options as
> before).
>
> Let's test now complete set of patches. I will keep around 2 hours on most
> loaded pppoe NAS, then distribute to 2-3 servers more if it doesn't crash.
BTW, after you complete this testing (no hurry) I would be glad if you
could try one more patch which I send earlier to the list. IMHO, it's
needed to fix some other locking problems. This patch could be applied
and tested as an addition to all currently tested patches (but let's
first be sure they really work).
Thanks,
Jarek P.
------------->
pkt_sched: Destroy qdiscs under rtnl_lock again.
We don't need to trigger __qdisc_destroy() as an RCU callback because
the use of qdisc isn't controlled by RCU alone: after querying RCU
with synchronize_rcu() in dev_deactivate() we additionaly wait in a
loop checking some flags. After the loop is done there could be no
outstanding use of the qdisc, so call_rcu() doesn't make any sense.
On the other hand, current calling Qdisc's ->destroy() from a softirq
context without locking (rtnl) can break various things like:
qdisc_put_rtab(), tcf_destroy_chain() (e.g. u32_destroy()), and
probably more.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/sch_generic.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 4685746..e7379d2 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -518,12 +518,8 @@ void qdisc_reset(struct Qdisc *qdisc)
}
EXPORT_SYMBOL(qdisc_reset);
-/* this is the rcu callback function to clean up a qdisc when there
- * are no further references to it */
-
-static void __qdisc_destroy(struct rcu_head *head)
+static void __qdisc_destroy(struct Qdisc *qdisc)
{
- struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu);
const struct Qdisc_ops *ops = qdisc->ops;
#ifdef CONFIG_NET_SCHED
@@ -554,7 +550,7 @@ void qdisc_destroy(struct Qdisc *qdisc)
if (qdisc->parent)
list_del(&qdisc->list);
- call_rcu(&qdisc->q_rcu, __qdisc_destroy);
+ __qdisc_destroy(qdisc);
}
EXPORT_SYMBOL(qdisc_destroy);
--
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
next prev parent reply other threads:[~2008-08-17 10:55 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 19:09 panic 2.6.27-rc3-git2, qdisc_dequeue_head Denys Fedoryshchenko
2008-08-15 20:16 ` Jarek Poplawski
2008-08-15 20:36 ` Denys Fedoryshchenko
2008-08-15 20:54 ` Denys Fedoryshchenko
2008-08-16 8:55 ` Jarek Poplawski
2008-08-16 9:13 ` Jarek Poplawski
2008-08-16 10:03 ` Denys Fedoryshchenko
2008-08-16 10:05 ` Denys Fedoryshchenko
2008-08-16 12:27 ` Jarek Poplawski
2008-08-16 12:24 ` Denys Fedoryshchenko
2008-08-16 12:34 ` Jarek Poplawski
2008-08-16 13:13 ` Denys Fedoryshchenko
2008-08-16 14:27 ` Jarek Poplawski
2008-08-16 15:28 ` Denys Fedoryshchenko
2008-08-16 15:59 ` Jarek Poplawski
2008-08-16 18:15 ` Denys Fedoryshchenko
2008-08-16 18:52 ` Jarek Poplawski
2008-08-16 19:22 ` Denys Fedoryshchenko
2008-08-16 19:47 ` Jarek Poplawski
2008-08-17 9:02 ` Denys Fedoryshchenko
2008-08-17 9:34 ` Jarek Poplawski
2008-08-17 9:35 ` Denys Fedoryshchenko
2008-08-17 9:52 ` Jarek Poplawski
2008-08-17 10:01 ` Denys Fedoryshchenko
2008-08-17 10:31 ` Jarek Poplawski
2008-08-17 10:55 ` Jarek Poplawski [this message]
2008-08-17 12:06 ` Denys Fedoryshchenko
2008-08-17 12:18 ` Denys Fedoryshchenko
2008-08-17 12:38 ` Jarek Poplawski
2008-08-17 12:50 ` Denys Fedoryshchenko
2008-08-17 13:03 ` Denys Fedoryshchenko
2008-08-17 13:36 ` Jarek Poplawski
2008-08-17 19:36 ` Denys Fedoryshchenko
2008-08-17 21:47 ` Jarek Poplawski
2008-08-17 22:02 ` David Miller
2008-08-17 22:21 ` Denys Fedoryshchenko
2008-08-17 22:32 ` Jarek Poplawski
2008-08-17 13: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=20080817105534.GD2907@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).