diff mbox series

[04/29] do_anonymous_page: use update_mmu_tlb()

Message ID 20210430195232.30491-5-michel@lespinasse.org (mailing list archive)
State New
Headers show
Series [01/29] mm: export dump_mm | expand

Commit Message

Michel Lespinasse April 30, 2021, 7:52 p.m. UTC
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.

(TODO double check with Bibo Mao <maobibo@loongson.cn>)

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Suren Baghdasaryan June 10, 2021, 12:38 a.m. UTC | #1
On Fri, Apr 30, 2021 at 12:52 PM Michel Lespinasse
<michel@lespinasse.org> 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.
>
> (TODO double check with Bibo Mao <maobibo@loongson.cn>)

You probably can drop this TODO. It looks like this one call was
missed in https://patchwork.kernel.org/project/linux-mips/patch/1590375160-6997-2-git-send-email-maobibo@loongson.cn
after Andrew asked to replace all update_mmu_cache() calls with an
alias in the previous version of this patch here:
https://patchwork.kernel.org/project/linux-mips/patch/1590031837-9582-2-git-send-email-maobibo@loongson.cn/#23374625.

>
> 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 550405fc3b5e..59ff65cb3ab4 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 mbox series

Patch

diff --git a/mm/memory.c b/mm/memory.c
index 550405fc3b5e..59ff65cb3ab4 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;
 	}