linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [patch] mm: madvise avoid exclusive mmap_sem
Date: Fri, 13 Apr 2007 21:08:15 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0704132101300.14508@blonde.wat.veritas.com> (raw)
In-Reply-To: <20070413115719.2bdf5705.akpm@linux-foundation.org>

On Fri, 13 Apr 2007, Andrew Morton wrote:
> On Thu, 12 Apr 2007 02:56:38 +0200
> Nick Piggin <npiggin@suse.de> wrote:
> 
> > Avoid down_write of the mmap_sem in madvise when we can help it.
> 
> Are we sure that running zap_page_range() under down_read() is safe?
> For hugepage regions too?

madvise_dontneed just says -EINVAL on a VM_HUGETLB vma, so I didn't
check the hugepage case further, it doesn't reach the zap_page_range.

We can indeed be sure that running zap_page_range on a normal vma
is safe under down_read (as opposed to the down_write there before),
because file truncation runs it without taking mmap_sem at all.

Hugh

--
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:[~2007-04-13 20:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12  0:56 Nick Piggin
2007-04-13 18:57 ` Andrew Morton
2007-04-13 20:08   ` Hugh Dickins [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=Pine.LNX.4.64.0704132101300.14508@blonde.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    /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