Message ID | 20210407014502.24091-4-michel@lespinasse.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RFC,01/37] mmap locking API: mmap_lock_is_contended returns a bool | expand |
Hi Bibo, You introduced this code in commit 7df676974359f back in May. Could you check that the change is correct ? Thanks, On Tue, Apr 06, 2021 at 06:44:28PM -0700, Michel Lespinasse wrote: > update_mmu_tlb() can be used instead of update_mmu_cache() when the > page fault handler detects that it lost the race to another page fault. > > Signed-off-by: Michel Lespinasse <michel@lespinasse.org> > --- > mm/memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory.c b/mm/memory.c > index 5efa07fb6cdc..8ee4bd239303 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -3567,7 +3567,7 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf) > vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, vmf->address, > &vmf->ptl); > if (!pte_none(*vmf->pte)) { > - update_mmu_cache(vma, vmf->address, vmf->pte); > + update_mmu_tlb(vma, vmf->address, vmf->pte); > goto release; > } > > -- > 2.20.1 >
diff --git a/mm/memory.c b/mm/memory.c index 5efa07fb6cdc..8ee4bd239303 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3567,7 +3567,7 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf) vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, vmf->address, &vmf->ptl); if (!pte_none(*vmf->pte)) { - update_mmu_cache(vma, vmf->address, vmf->pte); + update_mmu_tlb(vma, vmf->address, vmf->pte); goto release; }
update_mmu_tlb() can be used instead of update_mmu_cache() when the page fault handler detects that it lost the race to another page fault. Signed-off-by: Michel Lespinasse <michel@lespinasse.org> --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)