From: David Miller <davem@davemloft.net>
To: Matheos.Worku@Sun.COM
Cc: jesse.brandeburg@intel.com, jarkao2@gmail.com,
netdev@vger.kernel.org, herbert@gondor.apana.org.au,
hadi@cyberus.ca
Subject: Re: 2.6.24 BUG: soft lockup - CPU#X
Date: Thu, 27 Mar 2008 17:34:18 -0700 (PDT) [thread overview]
Message-ID: <20080327.173418.18777696.davem@davemloft.net> (raw)
In-Reply-To: <47EC399E.90804@sun.com>
From: Matheos Worku <Matheos.Worku@Sun.COM>
Date: Thu, 27 Mar 2008 17:19:42 -0700
> Actually I am running a version of the nxge driver which uses only one
> TX ring, no LLTX enabled so the driver does single threaded TX.
Ok.
> On the other hand, uperf (or iperf, netperf ) is running multiple TX
> connections in parallel and the connections are bound on multiple
> processors, hence they are running in parallel.
Yes, this is what I was interested in.
I think I know what's wrong.
If one cpu gets into the "qdisc remove, give to device" loop, other
cpus will simply add to the qdisc and that first cpu will do the all
of the TX processing.
This helps performance, but in your case it is clear that if the
device is fast enough and there are enough other cpus generating TX
traffic, it is quite trivial to get a cpu wedged there and never exit.
The code in question is net/sched/sch_generic.c:__qdisc_run(), it just
loops there until the device TX fills up or there are no more packets
in the qdisc queue.
qdisc_run() (in include/linux/pkt_sched.h) sets
__LINK_STATE_QDISC_RUNNING to tell other cpus that there is a cpu
processing the queue inside of __qdisc_run().
net/core/dev.c:dev_queue_xmit() then goes:
if (q->enqueue) {
/* Grab device queue */
spin_lock(&dev->queue_lock);
q = dev->qdisc;
if (q->enqueue) {
/* reset queue_mapping to zero */
skb_set_queue_mapping(skb, 0);
rc = q->enqueue(skb, q);
qdisc_run(dev);
spin_unlock(&dev->queue_lock);
rc = rc == NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : rc;
goto out;
}
spin_unlock(&dev->queue_lock);
}
The first cpu will get into __qdisc_run(), but the other
ones will just q->enqueue() and exit since the first cpu
has indicated it is processing the qdisc.
I'm not sure how we should fix this at the moment, we want
to keep the behavior but on the other hand we need to
break out of this so we don't get stuck here for too long.
next prev parent reply other threads:[~2008-03-28 0:34 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-26 16:46 2.6.24 BUG: soft lockup - CPU#X Matheos Worku
2008-03-26 17:31 ` Rick Jones
2008-03-26 20:14 ` Jarek Poplawski
2008-03-26 20:26 ` Matheos Worku
2008-03-26 21:46 ` Jarek Poplawski
2008-03-26 21:53 ` Jarek Poplawski
2008-03-27 10:33 ` Jarek Poplawski
2008-03-27 23:18 ` Brandeburg, Jesse
2008-03-27 23:45 ` Matheos Worku
2008-03-28 0:02 ` David Miller
2008-03-28 0:19 ` Matheos Worku
2008-03-28 0:34 ` David Miller [this message]
2008-03-28 1:22 ` Herbert Xu
2008-03-28 1:38 ` David Miller
2008-03-28 10:29 ` Herbert Xu
2008-03-28 10:56 ` Ingo Molnar
2008-03-28 11:06 ` Herbert Xu
2008-03-28 11:29 ` Herbert Xu
2008-03-28 12:19 ` jamal
2008-03-28 13:26 ` Herbert Xu
2008-03-28 14:07 ` jamal
2008-03-28 14:12 ` Ingo Molnar
2008-03-28 23:25 ` David Miller
2008-03-28 14:09 ` Ingo Molnar
2008-03-28 1:58 ` Matheos Worku
2008-03-28 10:33 ` jamal
2008-03-28 17:00 ` Matheos Worku
2008-03-28 10:38 ` Herbert Xu
2008-03-28 13:38 ` Jarek Poplawski
2008-03-28 13:53 ` Herbert Xu
2008-03-28 14:39 ` Jarek Poplawski
2008-03-28 14:56 ` Herbert Xu
2008-03-28 15:29 ` Jarek Poplawski
2008-03-28 15:47 ` Jarek Poplawski
2008-03-29 1:06 ` Herbert Xu
2008-03-29 9:11 ` 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=20080327.173418.18777696.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Matheos.Worku@Sun.COM \
--cc=hadi@cyberus.ca \
--cc=herbert@gondor.apana.org.au \
--cc=jarkao2@gmail.com \
--cc=jesse.brandeburg@intel.com \
--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).