From: Toshi Kani <toshi.kani@hpe.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, bp@alien8.de
Cc: stsp@list.ru, x86@kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] Change PAT to support mremap use-cases
Date: Tue, 22 Dec 2015 17:54:22 -0700 [thread overview]
Message-ID: <1450832064-10093-1-git-send-email-toshi.kani@hpe.com> (raw)
This patch-set fixes two issues found in PAT when mremap() is used on
a VM_PFNMAP range.
Patch 1/2 fixes an issue for mremap() with MREMAP_FIXED, which moves
a pfnmap from old vma to new vma. untrack_pfn_moved() is added to
clear VM_PAT from old vma.
Patch 2/2 fixes an issue for mremap() with a shrinking map size.
The free_memtype() path is changed to support this mremap case in
addition to the regular munmap case.
Note, using mremap() with an expanded map size is not a valid case
since VM_DONTEXPAND is set along with VM_PFNMAP.
v2:
- Add an explicit call in the mremap code which clears the PAT flag.
(Thomas Gleixner)
- Add comment to explain how memtype_rb_match() is used for shrinking
case. (Thomas Gleixner)
---
Toshi Kani (2):
1/2 x86/mm/pat: Add untrack_pfn_moved for mremap
2/2 x86/mm/pat: Change free_memtype() to support shrinking case
---
arch/x86/mm/pat.c | 12 +++++++++-
arch/x86/mm/pat_rbtree.c | 52 +++++++++++++++++++++++++++++++++++--------
include/asm-generic/pgtable.h | 10 ++++++++-
mm/mremap.c | 4 ++++
4 files changed, 67 insertions(+), 11 deletions(-)
--
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>
next reply other threads:[~2015-12-23 0:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 0:54 Toshi Kani [this message]
2015-12-23 0:54 ` [PATCH v2 1/2] x86/mm/pat: Add untrack_pfn_moved for mremap Toshi Kani
2015-12-23 0:54 ` [PATCH v2 2/2] x86/mm/pat: Change free_memtype() to support shrinking case Toshi Kani
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=1450832064-10093-1-git-send-email-toshi.kani@hpe.com \
--to=toshi.kani@hpe.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=stsp@list.ru \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).