From: Andrew Morton <akpm@linux-foundation.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Matt Mackall <mpm@selenic.com>, Alexey Dobriyan <adobriyan@sw.ru>,
linux-kernel@vger.kernel.org,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: - maps2-add-proc-pid-pagemap-interface-fix.patch removed from -mm tree
Date: Fri, 27 Apr 2007 22:48:44 -0700 [thread overview]
Message-ID: <20070427224844.8d6d5503.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0704280607330.9554@blonde.wat.veritas.com>
On Sat, 28 Apr 2007 06:13:39 +0100 (BST) Hugh Dickins <hugh@veritas.com> wrote:
> On Fri, 27 Apr 2007, Andrew Morton wrote:
> >
> > hm, could do. might_sleep() is intertwined with preempt in complex ways,
> > but we did decouple that at the config level. no_mmap_sem() will dtrt for
> > all preempt settings.
> >
> > But I'll be keeping this as a -mm-only debug patch (which brings us up to
> > about thirty of 'em), so I think it's best to make it unconfigurable so we
> > get maximum coverage.
> >
> > That's if it actually works. I haven't tried running it yet, and I have a
> > feeling that running it might cause a big "doh" moment. We'll see.
>
> Yes, I'm expecting the crucial
>
> > + WARN_ON(rwsem_is_locked(&mm->mmap_sem))
>
> to give a bogus warning every time another thread (or /proc,
> or swapoff, or whatever) happens to have this mmap_sem locked.
> might_sleep() is quite different, works on our thread's info.
>
Yes. lockdep has a way of working out if this task already has a
particular lock for reading or writing, but it isn't immediately obvious
how to extract that.
I guess a simple hack would be do do a down_read() on it. If it's already
held for reading, lockdep should warn. If it's already held for writing
someone will notice.
Oh well, it's not my top priority.
prev parent reply other threads:[~2007-04-28 5:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200704270814.l3R8EnFJ023047@shell0.pdx.osdl.net>
2007-04-27 10:45 ` - maps2-add-proc-pid-pagemap-interface-fix.patch removed from -mm tree Alexey Dobriyan
2007-04-27 20:27 ` Andrew Morton
2007-04-27 20:41 ` Matt Mackall
2007-04-27 21:31 ` Andrew Morton
2007-04-28 5:13 ` Hugh Dickins
2007-04-28 5:48 ` Andrew Morton [this message]
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=20070427224844.8d6d5503.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@sw.ru \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=nickpiggin@yahoo.com.au \
/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