Flush the entire user address space from the TLB for each VMA in the
task_struct list when clearing reference bits with /proc/pid/clear_refs.
It's more efficient than flushing each page individually depending on
pte_young().
Cc: Paul Mundt <[email protected]>
Cc: Christoph Lameter <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
---
fs/proc/task_mmu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -276,7 +276,6 @@ static void clear_refs_one_pmd(struct vm_area_struct *vma, pmd_t *pmd,
if (pte_young(ptent)) {
ptent = pte_mkold(ptent);
set_pte_at(vma->vm_mm, addr, pte, ptent);
- flush_tlb_page(vma, addr);
}
ClearPageReferenced(page);
}
@@ -358,6 +357,7 @@ void clear_refs_smap(struct mm_struct *mm)
for (vma = mm->mmap; vma; vma = vma->vm_next)
if (vma->vm_mm && !is_vm_hugetlb_page(vma))
for_each_pmd(vma, clear_refs_one_pmd, NULL);
+ flush_tlb_mm(mm);
up_read(&mm->mmap_sem);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]