[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131216181513.14eda80d@annuminas.surriel.com>
Date: Mon, 16 Dec 2013 18:15:13 -0500
From: Rik van Riel <riel@...hat.com>
To: Mel Gorman <mgorman@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alex Thorlton <athorlton@....com>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>, chegu_vinod@...com
Subject: [PATCH 19/18] mm,numa: write pte_numa pte back to the page tables
On Tue, 10 Dec 2013 15:51:23 +0000
Mel Gorman <mgorman@...e.de> wrote:
> The TLB must be flushed if the PTE is updated but change_pte_range is clearing
> the PTE while marking PTEs pte_numa without necessarily flushing the TLB if it
> reinserts the same entry. Without the flush, it's conceivable that two processors
> have different TLBs for the same virtual address and at the very least it would
> generate spurious faults. This patch only unmaps the pages in change_pte_range for
> a full protection change.
Turns out the patch optimized out not one, but both
pte writes. Oops.
We'll need this one too, Andrew :)
---8<---
Subject: mm,numa: write pte_numa pte back to the page tables
The patch "mm: numa: Do not clear PTE for pte_numa update" cleverly
optimizes out an extraneous PTE write when changing the protection
of pages to pte_numa.
It also optimizes out actually writing the new pte_numa entry back
to the page tables. Oops.
Signed-off-by: Rik van Riel <riel@...hat.com>
Reported-by: Chegu Vinod <chegu_vinod@...com>
---
mm/mprotect.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/mprotect.c b/mm/mprotect.c
index edc4e22..4114acf 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -67,6 +67,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
if (page && !PageKsm(page)) {
if (!pte_numa(oldpte)) {
ptent = pte_mknuma(ptent);
+ set_pte_at(mm, addr, pte, ptent);
updated = true;
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists