From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>, linux-mm@kvack.org
Subject: Re: [PATCHv2 4/4] thp: rewrite freeze_page()/unfreeze_page() with generic rmap walkers
Date: Fri, 11 Mar 2016 12:42:35 +0300 [thread overview]
Message-ID: <20160311094235.GA109992@black.fi.intel.com> (raw)
In-Reply-To: <1457351838-114702-5-git-send-email-kirill.shutemov@linux.intel.com>
On Mon, Mar 07, 2016 at 02:57:18PM +0300, Kirill A. Shutemov wrote:
> freeze_page() and unfreeze_page() helpers evolved in rather complex
> beasts. It would be nice to cut complexity of this code.
>
> This patch rewrites freeze_page() using standard try_to_unmap().
> unfreeze_page() is rewritten with remove_migration_ptes().
>
> The result is much simpler.
>
> But the new variant is somewhat slower for PTE-mapped THPs.
> Current helpers iterates over VMAs the compound page is mapped to, and
> then over ptes within this VMA. New helpers iterates over small page,
> then over VMA the small page mapped to, and only then find relevant pte.
>
> We have short cut for PMD-mapped THP: we directly install migration
> entries on PMD split.
>
> I don't think the slowdown is critical, considering how much simpler
> result is and that split_huge_page() is quite rare nowadays. It only
> happens due memory pressure or migration.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
> include/linux/huge_mm.h | 10 ++-
> mm/huge_memory.c | 201 +++++++-----------------------------------------
> mm/rmap.c | 9 ++-
> 3 files changed, 40 insertions(+), 180 deletions(-)
Andrew, could you please fold patch below into this one.
next prev parent reply other threads:[~2016-03-11 9:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 11:57 [PATCHv2 0/4] thp: simplify freeze_page() and unfreeze_page() Kirill A. Shutemov
2016-03-07 11:57 ` [PATCHv2 1/4] rmap: introduce rmap_walk_locked() Kirill A. Shutemov
2016-03-07 11:57 ` [PATCHv2 2/4] rmap: extend try_to_unmap() to be usable by split_huge_page() Kirill A. Shutemov
2016-03-07 11:57 ` [PATCHv2 3/4] mm: make remove_migration_ptes() beyond mm/migration.c Kirill A. Shutemov
2016-03-07 11:57 ` [PATCHv2 4/4] thp: rewrite freeze_page()/unfreeze_page() with generic rmap walkers Kirill A. Shutemov
2016-03-11 9:42 ` Kirill A. Shutemov [this message]
2016-04-19 13:55 ` Sasha Levin
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=20160311094235.GA109992@black.fi.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.