lkml.org 
[lkml]   [2010]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [rfc][patch] mm: lockdep page lock
From
Date
On Fri, 2010-03-26 at 03:18 +0000, Jamie Lokier wrote:
> Peter Zijlstra wrote:
> > On Tue, 2010-03-16 at 13:21 +1100, Nick Piggin wrote:
> > >
> > >
> > > Agreed (btw. Peter is there any way to turn lock debugging back on?
> > > it's annoying when cpufreq hotplug code or something early breaks and
> > > you have to reboot in order to do any testing).
> >
> > Not really, the only way to do that is to get the full system back into
> > a known (zero) lock state and then fully reset the lockdep state.
>
> How about: Set a variable nr_pending = number of CPUs, run a task on
> each CPU which disables interrupts, atomically decrements nr_pending
> and then spins waiting for it to become negative (raw, not counted in
> lockdep), and whichever one takes it to zero, that task knows there
> are no locks held, and can reset the lockdep state. Then sets it to
> -1 to wake everyone.

Nope, won't work, you can easily preempt a lock holder.



\
 
 \ /
  Last update: 2010-03-26 07:57    [W:0.078 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site