Skip to content

Commit bce8cb3

Browse files
Qi Zhengakpm00
authored andcommitted
mm: use update_mmu_tlb() on the second thread
As message in commit 7df6769 ("mm/memory.c: Update local TLB if PTE entry exists") said, we should update local TLB only on the second thread. So in the do_anonymous_page() here, we should use update_mmu_tlb() instead of update_mmu_cache() on the second thread. As David pointed out, this is a performance improvement, not a correctness fix. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Qi Zheng <[email protected]> Reviewed-by: Muchun Song <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Bibo Mao <[email protected]> Cc: Chris Zankel <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Max Filippov <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent d6e5040 commit bce8cb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4134,7 +4134,7 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf)
41344134
vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, vmf->address,
41354135
&vmf->ptl);
41364136
if (!pte_none(*vmf->pte)) {
4137-
update_mmu_cache(vma, vmf->address, vmf->pte);
4137+
update_mmu_tlb(vma, vmf->address, vmf->pte);
41384138
goto release;
41394139
}
41404140

0 commit comments

Comments
 (0)