From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Hugh Dickins <hughd@google.com>, linux-mm <linux-mm@kvack.org>,
Michel Lespinasse <walken@google.com>
Subject: Re: huge zero page vs FOLL_DUMP
Date: Mon, 14 Jan 2013 17:18:02 +0200 [thread overview]
Message-ID: <20130114151802.GA18801@otc-wbsnb-06> (raw)
In-Reply-To: <CANN689HKD7t91e+-oZw6Nqq=cYQDk1eo+0JD7g=3AomfpcNSCw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]
On Fri, Jan 11, 2013 at 08:27:31PM -0800, Michel Lespinasse wrote:
> On Fri, Jan 11, 2013 at 7:36 PM, Kirill A. Shutemov
> > Could you tese the patch?
> >
> > From 062a9b670ede9fe5fca1d1947b42990b6b0642a4 Mon Sep 17 00:00:00 2001
> > From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> > Date: Sat, 12 Jan 2013 05:18:58 +0200
> > Subject: [PATCH] thp: Avoid dumping huge zero page
> >
> > No reason to preserve huge zero page in core dump.
> >
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > Reported-by: Michel Lespinasse <walken@google.com>
> > ---
> > mm/huge_memory.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> > index 6001ee6..b5783d8 100644
> > --- a/mm/huge_memory.c
> > +++ b/mm/huge_memory.c
> > @@ -1257,6 +1257,10 @@ struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
> > if (flags & FOLL_WRITE && !pmd_write(*pmd))
> > goto out;
> >
> > + /* Avoid dumping huge zero page */
> > + if ((flags & FOLL_DUMP) && is_huge_zero_pmd(*pmd))
> > + return ERR_PTR(-EFAULT);
> > +
> > page = pmd_page(*pmd);
> > VM_BUG_ON(!PageHead(page));
> > if (flags & FOLL_TOUCH) {
>
> Looks sane to me, and it also helps my munlock test (we were getting
> and dropping references on the zero page which made it noticeably
> slower). Thanks!
>
> Reviewed-by: Michel Lespinasse <walken@google.com>
Andrew, please take the patch.
--
Kirill A. Shutemov
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-01-14 15:17 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 [this message]
2013-01-13 1:43 ` Simon Jeons
2013-01-13 16:10 ` Kirill A. Shutemov
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=20130114151802.GA18801@otc-wbsnb-06 \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--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).