aboutsummaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2013-10-07 06:29:05 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-09 06:40:32 -0400
commit1bc115d87dffd1c43bdc3c9c9d1e3a51c195d18e (patch)
tree56a26b4f4fe089e3dd1df5a26877d1e4c0114d35 /mm/huge_memory.c
parent9ff1d9ff3c2c8ab3feaeb2e8056a07ca293f7bde (diff)
mm: numa: Scan pages with elevated page_mapcount
Currently automatic NUMA balancing is unable to distinguish between false shared versus private pages except by ignoring pages with an elevated page_mapcount entirely. This avoids shared pages bouncing between the nodes whose task is using them but that is ignored quite a lot of data. This patch kicks away the training wheels in preparation for adding support for identifying shared/private pages is now in place. The ordering is so that the impact of the shared/private detection can be easily measured. Note that the patch does not migrate shared, file-backed within vmas marked VM_EXEC as these are generally shared library pages. Migrating such pages is not beneficial as there is an expectation they are read-shared between caches and iTLB and iCache pressure is generally low. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1381141781-10992-28-git-send-email-mgorman@suse.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 914216733e0a..2a28c2c6c165 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1484,14 +1484,12 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
1484 struct page *page = pmd_page(*pmd); 1484 struct page *page = pmd_page(*pmd);
1485 1485
1486 /* 1486 /*
1487 * Only check non-shared pages. Do not trap faults 1487 * Do not trap faults against the zero page. The
1488 * against the zero page. The read-only data is likely 1488 * read-only data is likely to be read-cached on the
1489 * to be read-cached on the local CPU cache and it is 1489 * local CPU cache and it is less useful to know about
1490 * less useful to know about local vs remote hits on 1490 * local vs remote hits on the zero page.
1491 * the zero page.
1492 */ 1491 */
1493 if (page_mapcount(page) == 1 && 1492 if (!is_huge_zero_page(page) &&
1494 !is_huge_zero_page(page) &&
1495 !pmd_numa(*pmd)) { 1493 !pmd_numa(*pmd)) {
1496 entry = pmdp_get_and_clear(mm, addr, pmd); 1494 entry = pmdp_get_and_clear(mm, addr, pmd);
1497 entry = pmd_mknuma(entry); 1495 entry = pmd_mknuma(entry);