mm/thp: Preserve pgprot across huge page split
Subsystems (3)
Commit-ID: 93c9d633bd9e183f105bc59d798d61c216a514f0 Gitweb: http://git.kernel.org/tip/93c9d633bd9e183f105bc59d798d61c216a514f0 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 17 Jul 2012 18:25:14 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 26 Sep 2012 11:48:31 +0200
mm/thp: Preserve pgprot across huge page split
If we marked a THP with our special PROT_NONE protections, ensure we don't loose them over a split.
Collapse seems to always allocate a new (huge) page which should already end up on the new target node so loosing protections there isn't a problem.
Signed-off-by Peter Zijlstra <[email protected]>
Reviewed-by Rik van Riel <[email protected]>
Cc Paul Turner <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Andrew Morton <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- arch/x86/include/asm/pgtable.h | 1 + mm/huge_memory.c | 104 +++++++++++++++++++--------------------- 2 files changed, 50 insertions(+), 55 deletions(-)
arch/x86/include/asm/pgtable.h +1 -0
@@ -350,6 +350,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) }#define pte_pgprot (x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK) +#define pmd_pgprot (x) __pgprot(pmd_val(x) & ~_HPAGE_CHG_MASK)#define canon_pgprot (p) __pgprot(massage_pgprot(p))
mm/huge_memory.c +49 -55
122 lines not on this page · raw message