mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>,
	Daniel J Blueman <daniel.blueman@gmail.com>,
	torvalds@linux-foundation.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [2.6.27-rc5] inotify_read's ev_mutex vs do_page_fault's mmap_sem...
Date: Thu, 11 Sep 2008 06:11:48 +1000	[thread overview]
Message-ID: <200809110611.49417.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <1221040771.2442.120.camel@twins.programming.kicks-ass.net>

On Wednesday 10 September 2008 19:59, Peter Zijlstra wrote:
> On Wed, 2008-09-10 at 19:50 +1000, Nick Piggin wrote:
> > On Wednesday 10 September 2008 18:37, Ingo Molnar wrote:
> > > * Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> > > > On Wednesday 10 September 2008 17:57, Peter Zijlstra wrote:
> > > > > Sure, how about the below - untested - uncompiled, might eat
> > > > > kittens, etc..
> > > > >
> > > > > Just sprinkle something like:
> > > > >
> > > > >   might_lock_read(&mm->mmap_sem);
> > > > >
> > > > > in the right places.
> > > >
> > > > Ahh, very nice, thanks! I'll give that a try...
> > >
> > > cool! Please send in an RFC patch once you have something that boots -
> > > we can stick it into tip/core/locking and see whether there's any new
> > > messages on a wide range of systems and workloads. (and we'd also check
> > > whether the number of kittens is an invariant.)
> >
> > Well I have verified it boots, and have used the annotation in some of
> > x86-64's user copy routines (luckily no flood of bugs I was scared of,
> > phew!)
> >
> > So I would like to request you merge Peter's patch, and we'll hopefully
> > start seeing the annotations being used.
>
> Will you send your x86_64 patch to be the first?

OK.


> > FWIW, I don't suppose lockdep
> > can determine that it is a sleeping lock, and do the appropriate
> > might_sleep checks at this point as well?
>
> Humm, no - we don't actually have that information there - I guess one
> could add it to lockdep_map and set it from the various init routines,
> but I'm not sure its worth it - just add might_sleep() along with
> might_lock() :-)

I guess so... seems like lockdep should know about "locks", however :)
Spinlock isn't always a spinlock, and ordinary kernel code usually
should not care about that.

But I'll add it in this case.

  reply	other threads:[~2008-09-10 10:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 21:03 Daniel J Blueman
2008-09-10  4:07 ` Nick Piggin
2008-09-10  7:57   ` Peter Zijlstra
2008-09-10  8:03     ` Nick Piggin
2008-09-10  8:37       ` Ingo Molnar
2008-09-10  9:50         ` Nick Piggin
2008-09-10  9:59           ` Peter Zijlstra
2008-09-10 20:11             ` Nick Piggin [this message]
2008-09-10 20:12   ` Nick Piggin
2008-09-10 20:10     ` Daniel J Blueman

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=200809110611.49417.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.blueman@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®