Message ID | 20200815043041.132195-1-shy828301@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] mm/memory.c: skip spurious TLB flush for retried page fault | expand |
On Mon, Aug 17, 2020 at 2:04 PM Yang Shi <shy828301@gmail.com> wrote: > > We could just skip the spurious TLB flush to mitigate the regression. Ok, this patch I will apply. I still hope that arm64 fixes (maybe already fixed) their spurious TLB function, and I think we should rename it to make sure everybody understands it's local, but in the meantime this patch hides the regression and isn't wrong. Thanks, Linus
On Tue, Aug 18, 2020 at 12:01:43PM -0700, Linus Torvalds wrote: > On Mon, Aug 17, 2020 at 2:04 PM Yang Shi <shy828301@gmail.com> wrote: > > > > We could just skip the spurious TLB flush to mitigate the regression. > > Ok, this patch I will apply. Cheers. > I still hope that arm64 fixes (maybe already fixed) their spurious TLB > function, and I think we should rename it to make sure everybody > understands it's local, but in the meantime this patch hides the > regression and isn't wrong. I'll look at it for 5.10. Will
diff --git a/mm/memory.c b/mm/memory.c index 3a7779d9891d..602f4283122f 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4247,6 +4247,9 @@ static vm_fault_t handle_pte_fault(struct vm_fault *vmf) vmf->flags & FAULT_FLAG_WRITE)) { update_mmu_cache(vmf->vma, vmf->address, vmf->pte); } else { + /* Skip spurious TLB flush for retried page fault */ + if (vmf->flags & FAULT_FLAG_TRIED) + goto unlock; /* * This is needed only for protection faults but the arch code * is not yet telling us if this is a protection fault or not.