Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1582622
| From | Mike Galbraith <efault@gmx.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RT] lockdep munching nr_list_entries like popcorn |
| Date | 2017-02-16 15:50 +0100 |
| Message-ID | <tbvxD-7yW-1@gated-at.bofh.it> (permalink) |
| References | <tbnqp-283-3@gated-at.bofh.it> <tbpLA-3Gu-13@gated-at.bofh.it> <tbq4W-3Nz-27@gated-at.bofh.it> <tbqeC-46b-21@gated-at.bofh.it> <tbs6K-5om-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 2017-02-16 at 12:06 +0100, Peter Zijlstra wrote:
> 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 ;-
Weeell, I'm trying to cobble something kinda like that together using
__RT_SPIN_INITIALIZER() instead, but seems mean ole Mr. Compiler NAKs
the PER_CPU_DEP_MAP_INIT() thingy.
CC mm/swap.o
mm/swap.c:54:689: error: braced-group within expression allowed only
inside a function
-Mike
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RT] lockdep munching nr_list_entries like popcorn Mike Galbraith <efault@gmx.de> - 2017-02-16 07:10 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Thomas Gleixner <tglx@linutronix.de> - 2017-02-16 09:40 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Mike Galbraith <efault@gmx.de> - 2017-02-16 10:00 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Thomas Gleixner <tglx@linutronix.de> - 2017-02-16 10:10 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Mike Galbraith <efault@gmx.de> - 2017-02-16 10:30 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Peter Zijlstra <peterz@infradead.org> - 2017-02-16 12:10 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Mike Galbraith <efault@gmx.de> - 2017-02-16 15:50 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-02-16 16:00 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Mike Galbraith <efault@gmx.de> - 2017-02-16 19:10 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Mike Galbraith <efault@gmx.de> - 2017-02-16 19:20 +0100
Re: [RT] lockdep munching nr_list_entries like popcorn Mike Galbraith <efault@gmx.de> - 2017-02-17 22:00 +0100
csiph-web