All of lore.kernel.org
 help / color / mirror / Atom feed
From: Divy Le Ray <divy@chelsio.com>
To: Roland Dreier <rdreier@cisco.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	netdev@vger.kernel.org, Steve Wise <swise@opengridcomputing.com>,
	Dimitris Michailidis <dm@chelsio.com>,
	Felix Marti <felix@chelsio.com>
Subject: Re: cxgb3: Fix lockdep problems with sge.reg_lock
Date: Mon, 24 Mar 2008 14:14:58 -0700	[thread overview]
Message-ID: <47E819D2.9040805@chelsio.com> (raw)
In-Reply-To: <adabq59xhmv.fsf@cisco.com>

Roland Dreier wrote:
> Using iWARP with a Chelsio T3 NIC generates the following lockdep warning:
>
>     =================================
>     [ INFO: inconsistent lock state ]
>     2.6.25-rc6 #50
>     ---------------------------------
>     inconsistent {softirq-on-W} -> {in-softirq-W} usage.
>     swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
>      (&adap->sge.reg_lock){-+..}, at: [<ffffffff880e5ee2>] cxgb_offload_ctl+0x3af/0x507 [cxgb3]
>
> The problem is that reg_lock is used with plain spin_lock() in
> drivers/net/cxgb3/sge.c but is used with spin_lock_irqsave() in
> drivers/net/cxgb3/cxgb3_offload.c.  This is technically a false
> positive, since the uses in sge.c are only in the initialization and
> cleanup paths and cannot overlap with any use in interrupt context.
>
> The best fix is probably just to use spin_lock_irq() with reg_lock in
> sge.c.  Even though it's not strictly required for correctness, it
> avoids triggering lockdep and the extra overhead of disabling
> interrupts is not important at all in the initialization and cleanup
> slow paths.
>
> Signed-off-by: Roland Dreier <rolandd@cisco.com>
>   
Acked-by: Divy Le Ray <divy@chelsio.com>

As you mention, the current code is correct even if lockdep disagrees.


Cheers,
Divy

  reply	other threads:[~2008-03-24 21:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20 20:30 cxgb3: Fix lockdep problems with sge.reg_lock Roland Dreier
2008-03-24 21:14 ` Divy Le Ray [this message]
2008-03-26  3:20 ` Jeff Garzik

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=47E819D2.9040805@chelsio.com \
    --to=divy@chelsio.com \
    --cc=dm@chelsio.com \
    --cc=felix@chelsio.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=swise@opengridcomputing.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.