linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Simon Jeons <simon.jeons@gmail.com>
Cc: Michel Lespinasse <walken@google.com>,
	Hugh Dickins <hughd@google.com>, linux-mm <linux-mm@kvack.org>
Subject: Re: huge zero page vs FOLL_DUMP
Date: Sun, 13 Jan 2013 18:10:57 +0200	[thread overview]
Message-ID: <20130113161056.GA2046@otc-wbsnb-06> (raw)
In-Reply-To: <1358041388.31895.0.camel@kernel.cn.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]

On Sat, Jan 12, 2013 at 07:43:08PM -0600, Simon Jeons wrote:
> On Sat, 2013-01-12 at 05:36 +0200, Kirill A. Shutemov wrote:
> > On Fri, Jan 11, 2013 at 03:53:34PM -0800, Michel Lespinasse wrote:
> > > Hi,
> > > 
> > > follow_page() has code to return ERR_PTR(-EFAULT) when it encounters
> > > the zero page and FOLL_DUMP flag is passed - this is used to avoid
> > > dumping the zero page to disk when doing core dumps, and also by
> > > munlock to avoid having potentially large number of threads trying to
> > > munlock the zero page at once, which we can't reclaim anyway.
> > > 
> > > We don't have the corresponding logic when follow_page() encounters a
> > > huge zero page. I think we should, preferably before 3.8. However, I
> > > am slightly confused as to what to do for the munlock case, as the
> > > huge zero page actually does seem to be reclaimable. My guess is that
> > > we could still skip the munlocks, until the zero page is actually
> > > reclaimed at which point we should check if we can munlock it.
> > > 
> > > Kirill, is this something you would have time to look into ?
> > 
> > Nice catch! Thank you.
> > 
> > I don't think we should do anything about mlock(). Huge zero page cannot
> > be mlocked -- it will not pass page->mapping check in
> 
> Hi Kirill,
> 
> What's store in page->mapping of huge zero page?

NULL.

-- 
 Kirill A. Shutemov

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-01-13 16:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 23:53 huge zero page vs FOLL_DUMP Michel Lespinasse
2013-01-12  3:36 ` Kirill A. Shutemov
2013-01-12  4:27   ` Michel Lespinasse
2013-01-14 15:18     ` Kirill A. Shutemov
2013-01-13  1:43   ` Simon Jeons
2013-01-13 16:10     ` Kirill A. Shutemov [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=20130113161056.GA2046@otc-wbsnb-06 \
    --to=kirill.shutemov@linux.intel.com \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=simon.jeons@gmail.com \
    --cc=walken@google.com \
    /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).