lkml.org 
[lkml]   [2012]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpumask: fix lg_lock/br_lock.

* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Wed, 2012-02-29 at 09:29 +0100, Ingo Molnar wrote:
>
> > As part of any cleanup they should first be converted from
> > arch_spinlock_t to regular spinlock_t - I bet if that is
> > done then that not only simplifies the wrappers massively,
> > it also turns the above soft lockup report into a nice,
> > actionable lockdep splat.
>
> It might help if you'd actually read the code.. that will
> simply not work.

It cannot find all bugs - such as the CPU hotplug race that is
still present in the code.

Still there's no excuse to go outside regular spinlock debug
primitives via arch_spinlock_t.

If lockdep blows up in br_write_lock() due to holding up to 4096
individual locks then we should add the exceptions to this
particular write lock when the CPU count is too high - but:

- do not disable the checking on saner configs

- not disable all the *OTHER* lock debugging checks such as:

- spin-lockup detection [this works even without ->held_locks]

- allocate/free failure detection:

The percpu code could be extended to run the equivalent
of debug_check_no_locks_freed() over the percpu area
that is going away, to make sure no held locks are
freed.

etc.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-02-29 10:35    [W:0.086 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site