linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Nick Piggin <npiggin@suse.de>, Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [rfc][patch] mm: lockdep page lock
Date: Fri, 26 Mar 2010 11:54:57 +0000	[thread overview]
Message-ID: <20100326115457.GB19308@shareable.org> (raw)
In-Reply-To: <1269586447.12097.118.camel@laptop>

Peter Zijlstra wrote:
> 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.

Doh, yes of course.

I promise to get some sleep before further appearances :-)

-- Jamie

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-03-26 11:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 15:58 [rfc][patch] mm: lockdep page lock Nick Piggin
2010-03-15 18:08 ` Jan Kara
2010-03-16  2:21   ` Nick Piggin
2010-03-16 11:52     ` Jan Kara
2010-03-24 13:28     ` Peter Zijlstra
2010-03-25  5:36       ` Nick Piggin
2010-03-25  9:40         ` Peter Zijlstra
2010-03-26  3:18       ` Jamie Lokier
2010-03-26  6:54         ` Peter Zijlstra
2010-03-26 11:54           ` Jamie Lokier [this message]
2010-03-24 13:54     ` Peter Zijlstra
2010-03-16  6:20 ` Ingo Molnar
2010-03-16  6:42   ` Nick Piggin

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=20100326115457.GB19308@shareable.org \
    --to=jamie@shareable.org \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=peterz@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).