From: Zach Brown <zach.brown@oracle.com>
To: openib-general@openib.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Arjan van de Ven <arjan@infradead.org>,
Ingo Molnar <mingo@elte.hu>
Subject: ipoib lockdep warning
Date: Tue, 11 Jul 2006 13:10:48 -0700 [thread overview]
Message-ID: <44B405C8.4040706@oracle.com> (raw)
I get an awfully verbose lockdep warning when I bring up ipoib devices
and wanted to make sure it didn't go unreported. I've put it up at the
following URL:
http://oss.oracle.com/~zab/ipoib-multicast-lockdep-warning.txt
I looked into it a bit and it seems to be on to something. There might
be a AB, BC, CA ordering deadlock.
AB:
priv->lock is held while acquiring query_idr.lock
ipoib_mcast_send()
spin_lock(&priv->lock);
ipoib_mcast_sendonly_join()
ib_sa_mcmember_rec_query()
send_mad()
idr_pre_get(&query_idr)
spin_lock(&idp->lock);
BC:
query_idr.lock is taken with interrupts enabled and so is implicitly
ordered before dev->_xmit_lock which is taken in interrupt context.
ipoib_mcast_join_task()
ipoib_mcast_join()
ib_sa_mcmember_rec_query()
send_mad()
idr_pre_get(&query_idr)
spin_lock(&idp->lock)
CA:
dev->_xmit_lock is held while acquiring priv->lock. This triggers the
lockdep warning that adding the dep between dev->_xmit_lock and
priv->lock connects a soft-irq-safe lock to a soft-irq-unsafe one.
ipoib_mcast_restart_task()
local_irq_save(flags);
netif_tx_lock(dev)
spin_lock(&dev->_xmit_lock);
spin_lock(&priv->lock);
I can imagine all sorts of potential fixes (block ints when calling idr?
reorder acquiry in ipoib_mcast_restart_task()?) but I'm operating on a
partial view of the paths here so I wasn't comfortable suggesting a fix.
I wouldn't be surprised to hear that there are circumstances that both
lockdep and I don't know about that stop this from being a problem :).
In any case, it'd be fantastic if someone who knows this code could sit
down with lockdep and some ipoib regression suite to shake out lockdep's
complaints.
- z
next reply other threads:[~2006-07-11 20:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 20:10 Zach Brown [this message]
2006-07-11 21:16 ` ipoib lockdep warning Michael S. Tsirkin
2006-07-11 21:40 ` Sean Hefty
2006-07-11 21:50 ` [openib-general] " Zach Brown
2006-07-11 22:54 ` Roland Dreier
2006-07-11 23:27 ` Zach Brown
2006-07-11 23:43 ` Roland Dreier
2006-07-11 23:53 ` Zach Brown
2006-07-12 0:06 ` Roland Dreier
2006-07-12 9:38 ` Ingo Molnar
2006-07-12 11:09 ` Michael S. Tsirkin
2006-07-12 16:31 ` [openib-general] " Sean Hefty
2006-07-12 18:56 ` Roland Dreier
2006-07-13 15:55 ` [PATCH] IB/core: use correct gfp_mask in sa_query Michael S. Tsirkin
2006-07-12 19:06 ` [openib-general] ipoib lockdep warning Roland Dreier
2006-07-12 20:45 ` [PATCH] Convert idr's internal locking to _irqsave variant Roland Dreier
2006-07-12 21:14 ` Ingo Molnar
2006-07-13 1:30 ` Andrew Morton
2006-07-13 15:42 ` Roland Dreier
2006-07-13 20:54 ` Andrew Morton
2006-07-13 21:03 ` Roland Dreier
2006-07-13 21:05 ` Arjan van de Ven
2006-07-14 0:18 ` Roland Dreier
2006-07-14 6:20 ` Arjan van de Ven
2006-07-13 21:43 ` Andrew Morton
2006-07-14 1:08 ` Roland Dreier
2006-07-14 1:18 ` Andrew Morton
2006-07-14 1:30 ` Andrew Morton
2006-07-17 15:57 ` Roland Dreier
2006-07-12 2:33 ` [openib-general] ipoib lockdep warning Roland Dreier
2006-07-12 6:49 ` Arjan van de Ven
2006-07-12 19:01 ` Roland Dreier
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=44B405C8.4040706@oracle.com \
--to=zach.brown@oracle.com \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=openib-general@openib.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