aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/mprotect.c7
-rw-r--r--mm/vmstat.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 2bbb648ea73f..d4d5399c7aba 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -135,6 +135,7 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
135 pmd_t *pmd; 135 pmd_t *pmd;
136 unsigned long next; 136 unsigned long next;
137 unsigned long pages = 0; 137 unsigned long pages = 0;
138 unsigned long nr_huge_updates = 0;
138 bool all_same_node; 139 bool all_same_node;
139 140
140 pmd = pmd_offset(pud, addr); 141 pmd = pmd_offset(pud, addr);
@@ -145,7 +146,8 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
145 split_huge_page_pmd(vma, addr, pmd); 146 split_huge_page_pmd(vma, addr, pmd);
146 else if (change_huge_pmd(vma, pmd, addr, newprot, 147 else if (change_huge_pmd(vma, pmd, addr, newprot,
147 prot_numa)) { 148 prot_numa)) {
148 pages++; 149 pages += HPAGE_PMD_NR;
150 nr_huge_updates++;
149 continue; 151 continue;
150 } 152 }
151 /* fall through */ 153 /* fall through */
@@ -165,6 +167,9 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
165 change_pmd_protnuma(vma->vm_mm, addr, pmd); 167 change_pmd_protnuma(vma->vm_mm, addr, pmd);
166 } while (pmd++, addr = next, addr != end); 168 } while (pmd++, addr = next, addr != end);
167 169
170 if (nr_huge_updates)
171 count_vm_numa_events(NUMA_HUGE_PTE_UPDATES, nr_huge_updates);
172
168 return pages; 173 return pages;
169} 174}
170 175
diff --git a/mm/vmstat.c b/mm/vmstat.c
index f42745e65780..10bbb5427a6d 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -779,6 +779,7 @@ const char * const vmstat_text[] = {
779 779
780#ifdef CONFIG_NUMA_BALANCING 780#ifdef CONFIG_NUMA_BALANCING
781 "numa_pte_updates", 781 "numa_pte_updates",
782 "numa_huge_pte_updates",
782 "numa_hint_faults", 783 "numa_hint_faults",
783 "numa_hint_faults_local", 784 "numa_hint_faults_local",
784 "numa_pages_migrated", 785 "numa_pages_migrated",