All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Jeff Layton <jlayton@poochiereds.net>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andi Kleen <andi@firstfloor.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lglock: Use spinlock_t instead of arch_spinlock_t
Date: Tue, 31 Mar 2015 11:17:34 +0200	[thread overview]
Message-ID: <20150331091734.GA17126@gmail.com> (raw)
In-Reply-To: <5518E838.4000409@bmw-carit.de>


* Daniel Wagner <daniel.wagner@bmw-carit.de> wrote:

> On 03/26/2015 05:03 PM, Peter Zijlstra wrote:
> > On Thu, Mar 26, 2015 at 04:02:08PM +0100, Daniel Wagner wrote:
> >> @@ -67,9 +67,9 @@ void lg_global_lock(struct lglock *lg)
> >>  	preempt_disable();
> >>  	lock_acquire_exclusive(&lg->lock_dep_map, 0, 0, NULL, _RET_IP_);
> >>  	for_each_possible_cpu(i) {
> >> -		arch_spinlock_t *lock;
> >> +		spinlock_t *lock;
> >>  		lock = per_cpu_ptr(lg->lock, i);
> >> -		arch_spin_lock(lock);
> >> +		spin_lock(lock);
> >>  	}
> >>  }
> > 
> > Nope, that'll blow up in two separate places.
> > 
> > One: lockdep, it can only track a limited number of held locks, and it
> > will further report a recursion warning on the 2nd cpu.
> 
> I was wondering why I haven't seen it explode. As it turns out I haven't
> looked closely enough at dmesg:
> 
> [  +0.001231] BUG: MAX_LOCK_DEPTH too low!
> [  +0.000092] turning off the locking correctness validator.

Yeah, we try really hard to not crash the kernel from debugging code, 
whenever we can avoid it! That sometimes creates a false sense of good 
kernel health.

Thanks,

	Ingo

      reply	other threads:[~2015-03-31  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 15:02 [PATCH] lglock: Use spinlock_t instead of arch_spinlock_t Daniel Wagner
2015-03-26 16:03 ` Peter Zijlstra
2015-03-30  6:07   ` Daniel Wagner
2015-03-31  9:17     ` Ingo Molnar [this message]

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=20150331091734.GA17126@gmail.com \
    --to=mingo@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=bfields@fieldses.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=jlayton@poochiereds.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /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.