From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>,
RT <linux-rt-users@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [RT] lockdep munching nr_list_entries like popcorn
Date: Thu, 16 Feb 2017 12:06:18 +0100 [thread overview]
Message-ID: <20170216110618.GC6557@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1702161001100.3543@nanos>
On Thu, Feb 16, 2017 at 10:01:18AM +0100, Thomas Gleixner wrote:
> On Thu, 16 Feb 2017, Mike Galbraith wrote:
>
> > On Thu, 2017-02-16 at 09:37 +0100, Thomas Gleixner wrote:
> > > On Thu, 16 Feb 2017, Mike Galbraith wrote:
> > >
> > ...
> > > > swapvec_lock? Oodles of 'em? Nope.
> > >
> > > Well, it's a per cpu lock and the lru_cache_add() variants might be called
> > > from a gazillion of different call chains, but yes, it does not make a lot
> > > of sense. We'll have a look.
> >
> > Adding explicit local_irq_lock_init() makes things heaps better, so
> > presumably we need better lockdep-foo in DEFINE_LOCAL_IRQ_LOCK().
>
> Bah.
#ifdef CONFIG_DEBUG_LOCK_ALLOC
#define PER_CPU_DEP_MAP_INIT(lockname) \
.dep_map = { \
.key = ({ static struct lock_class_key __key; &__key }), \
.name = #lockname, \
}
#else
#define PER_CPU_DEP_MAP_INIT(lockname)
#endif
#define DEFINE_LOCAL_IRQ_LOCK(lvar) \
DEFINE_PER_CPU(struct local_irq_lock, lvar) = { \
.lock = { .rlock = { \
.raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
SPIN_DEBUG_INIT(lvar) \
PER_CPU_DEP_MAP_INIT(lvar) \
} } \
}
That's fairly horrible for poking inside all the internals, but it might
just work ;-)
next prev parent reply other threads:[~2017-02-16 11:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 6:03 [RT] lockdep munching nr_list_entries like popcorn Mike Galbraith
2017-02-16 8:37 ` Thomas Gleixner
2017-02-16 8:50 ` Mike Galbraith
2017-02-16 9:01 ` Thomas Gleixner
2017-02-16 9:27 ` Mike Galbraith
2017-02-16 11:06 ` Peter Zijlstra [this message]
2017-02-16 14:42 ` Mike Galbraith
2017-02-16 14:53 ` Sebastian Andrzej Siewior
2017-02-16 18:06 ` Mike Galbraith
2017-02-16 18:16 ` Mike Galbraith
2017-02-17 20:55 ` Mike Galbraith
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=20170216110618.GC6557@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=tglx@linutronix.de \
/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