[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150331091734.GA17126@gmail.com>
Date: Tue, 31 Mar 2015 11:17:34 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Daniel Wagner <daniel.wagner@...-carit.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Jeff Layton <jlayton@...chiereds.net>,
Ingo Molnar <mingo@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
"J. Bruce Fields" <bfields@...ldses.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andi Kleen <andi@...stfloor.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lglock: Use spinlock_t instead of arch_spinlock_t
* Daniel Wagner <daniel.wagner@...-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists