From: Matthew Wilcox <matthew@wil.cx>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: linux-fsdevel@vger.kernel.org,
linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: per_cpu_counter_sum lockdep warning
Date: Tue, 3 Jun 2008 21:59:54 -0600 [thread overview]
Message-ID: <20080604035954.GE3549@parisc-linux.org> (raw)
In-Reply-To: <48460B94.8050000@linux.vnet.ibm.com>
On Wed, Jun 04, 2008 at 08:57:16AM +0530, Balbir Singh wrote:
> Saw this warning on an x86_64 box, while booting up 2.6.26-rc4. Has anybody else
> seen it? Working on it?
I've neither seen it, nor am I working on it, but I can decode it.
> inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
Translation: "This lock was previously grabbed in hardirq context. Now
someone's taking it in process context without interrupts disabled.
That could lead to a deadlock."
> init/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
> (&fbc->lock){+...}, at: [<ffffffff80386382>] __percpu_counter_sum+0xf/0x5a
That's the name of the lock -- &fbc->lock and the function where it
happens.
> {in-hardirq-W} state was registered at:
> [<ffffffffffffffff>] 0xffffffffffffffff
Drat, no backtrace for the guy who took the lock in hardirq context.
> Call Trace:
> [<ffffffff802518e6>] print_usage_bug+0x15e/0x16f
> [<ffffffff8025281f>] mark_lock+0x22f/0x416
> [<ffffffff80386382>] ? __percpu_counter_sum+0xf/0x5a
> [<ffffffff80253576>] __lock_acquire+0x4e7/0xc8a
> [<ffffffff80386382>] ? __percpu_counter_sum+0xf/0x5a
> [<ffffffff80253da7>] lock_acquire+0x8e/0xb2
> [<ffffffff80386382>] ? __percpu_counter_sum+0xf/0x5a
> [<ffffffff805990d7>] _spin_lock+0x26/0x53
> [<ffffffff80386382>] __percpu_counter_sum+0xf/0x5a
> [<ffffffff803139e2>] ext3_statfs+0xd6/0x160
ext3_statfs was the one who asked for the lock to be taken without
disabling interrupts.
Some percpu counters are supposed to be used from interrupt context.
These are created with percpu_counter_init_irq. Others are not and
should be created with percpu_counter_init. It seems like someone's
made a mess of that rule. This is likely to be a driver, IMO. Perhaps
you could work on tracking this down?
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2008-06-04 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 3:27 per_cpu_counter_sum lockdep warning Balbir Singh
2008-06-04 3:59 ` Matthew Wilcox [this message]
2008-06-04 4:43 ` Balbir Singh
2008-06-04 4:56 ` Balbir Singh
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=20080604035954.GE3549@parisc-linux.org \
--to=matthew@wil.cx \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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).