From: Greg Kroah-Hartman Date: Mon, 24 Aug 2020 18:04:02 +0000 (+0200) Subject: drop mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch from 4.14,... X-Git-Tag: v4.4.234~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e1fa69eb8ba75a159f503cb759fd0b6b523ecda;p=thirdparty%2Fkernel%2Fstable-queue.git drop mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch from 4.14, 4.19, and 5.4 queues --- diff --git a/queue-4.14/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch b/queue-4.14/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch deleted file mode 100644 index b305473e447..00000000000 --- a/queue-4.14/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch +++ /dev/null @@ -1,52 +0,0 @@ -From b7333b58f358f38d90d78e00c1ee5dec82df10ad Mon Sep 17 00:00:00 2001 -From: Yang Shi -Date: Fri, 14 Aug 2020 21:30:41 -0700 -Subject: mm/memory.c: skip spurious TLB flush for retried page fault - -From: Yang Shi - -commit b7333b58f358f38d90d78e00c1ee5dec82df10ad upstream. - -Recently we found regression when running will_it_scale/page_fault3 test -on ARM64. Over 70% down for the multi processes cases and over 20% down -for the multi threads cases. It turns out the regression is caused by -commit 89b15332af7c ("mm: drop mmap_sem before calling -balance_dirty_pages() in write fault"). - -The test mmaps a memory size file then write to the mapping, this would -make all memory dirty and trigger dirty pages throttle, that upstream -commit would release mmap_sem then retry the page fault. The retried -page fault would see correct PTEs installed then just fall through to -spurious TLB flush. The regression is caused by the excessive spurious -TLB flush. It is fine on x86 since x86's spurious TLB flush is no-op. - -We could just skip the spurious TLB flush to mitigate the regression. - -Suggested-by: Linus Torvalds -Reported-by: Xu Yu -Debugged-by: Xu Yu -Tested-by: Xu Yu -Cc: Johannes Weiner -Cc: Catalin Marinas -Cc: Will Deacon -Cc: -Signed-off-by: Yang Shi -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman - ---- - mm/memory.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -4010,6 +4010,9 @@ static int handle_pte_fault(struct vm_fa - 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. diff --git a/queue-4.14/series b/queue-4.14/series index 35bff2763b6..9d18d58c501 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -15,7 +15,6 @@ mm-include-cma-pages-in-lowmem_reserve-at-boot.patch mm-page_alloc-fix-core-hung-in-free_pcppages_bulk.patch ext4-fix-checking-of-directory-entry-validity-for-inline-directories.patch jbd2-add-the-missing-unlock_buffer-in-the-error-path-of-jbd2_write_superblock.patch -mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch spi-prevent-adding-devices-below-an-unregistering-co.patch scsi-ufs-add-delay_before_lpm-quirk-for-micron-devic.patch media-budget-core-improve-exception-handling-in-budg.patch diff --git a/queue-4.19/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch b/queue-4.19/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch deleted file mode 100644 index c12f05008b5..00000000000 --- a/queue-4.19/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch +++ /dev/null @@ -1,52 +0,0 @@ -From b7333b58f358f38d90d78e00c1ee5dec82df10ad Mon Sep 17 00:00:00 2001 -From: Yang Shi -Date: Fri, 14 Aug 2020 21:30:41 -0700 -Subject: mm/memory.c: skip spurious TLB flush for retried page fault - -From: Yang Shi - -commit b7333b58f358f38d90d78e00c1ee5dec82df10ad upstream. - -Recently we found regression when running will_it_scale/page_fault3 test -on ARM64. Over 70% down for the multi processes cases and over 20% down -for the multi threads cases. It turns out the regression is caused by -commit 89b15332af7c ("mm: drop mmap_sem before calling -balance_dirty_pages() in write fault"). - -The test mmaps a memory size file then write to the mapping, this would -make all memory dirty and trigger dirty pages throttle, that upstream -commit would release mmap_sem then retry the page fault. The retried -page fault would see correct PTEs installed then just fall through to -spurious TLB flush. The regression is caused by the excessive spurious -TLB flush. It is fine on x86 since x86's spurious TLB flush is no-op. - -We could just skip the spurious TLB flush to mitigate the regression. - -Suggested-by: Linus Torvalds -Reported-by: Xu Yu -Debugged-by: Xu Yu -Tested-by: Xu Yu -Cc: Johannes Weiner -Cc: Catalin Marinas -Cc: Will Deacon -Cc: -Signed-off-by: Yang Shi -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman - ---- - mm/memory.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -4062,6 +4062,9 @@ static vm_fault_t handle_pte_fault(struc - 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. diff --git a/queue-4.19/series b/queue-4.19/series index c0e5440cb14..35bb01bf753 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -14,7 +14,6 @@ mm-page_alloc-fix-core-hung-in-free_pcppages_bulk.patch ext4-fix-checking-of-directory-entry-validity-for-inline-directories.patch jbd2-add-the-missing-unlock_buffer-in-the-error-path-of-jbd2_write_superblock.patch scsi-zfcp-fix-use-after-free-in-request-timeout-handlers.patch -mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch drm-amd-display-fix-pow-crashing-when-given-base-0.patch kthread-do-not-preempt-current-task-if-it-is-going-to-call-schedule.patch spi-prevent-adding-devices-below-an-unregistering-co.patch diff --git a/queue-5.4/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch b/queue-5.4/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch deleted file mode 100644 index b4e28fc44c4..00000000000 --- a/queue-5.4/mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch +++ /dev/null @@ -1,52 +0,0 @@ -From b7333b58f358f38d90d78e00c1ee5dec82df10ad Mon Sep 17 00:00:00 2001 -From: Yang Shi -Date: Fri, 14 Aug 2020 21:30:41 -0700 -Subject: mm/memory.c: skip spurious TLB flush for retried page fault - -From: Yang Shi - -commit b7333b58f358f38d90d78e00c1ee5dec82df10ad upstream. - -Recently we found regression when running will_it_scale/page_fault3 test -on ARM64. Over 70% down for the multi processes cases and over 20% down -for the multi threads cases. It turns out the regression is caused by -commit 89b15332af7c ("mm: drop mmap_sem before calling -balance_dirty_pages() in write fault"). - -The test mmaps a memory size file then write to the mapping, this would -make all memory dirty and trigger dirty pages throttle, that upstream -commit would release mmap_sem then retry the page fault. The retried -page fault would see correct PTEs installed then just fall through to -spurious TLB flush. The regression is caused by the excessive spurious -TLB flush. It is fine on x86 since x86's spurious TLB flush is no-op. - -We could just skip the spurious TLB flush to mitigate the regression. - -Suggested-by: Linus Torvalds -Reported-by: Xu Yu -Debugged-by: Xu Yu -Tested-by: Xu Yu -Cc: Johannes Weiner -Cc: Catalin Marinas -Cc: Will Deacon -Cc: -Signed-off-by: Yang Shi -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman - ---- - mm/memory.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -3886,6 +3886,9 @@ static vm_fault_t handle_pte_fault(struc - 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. diff --git a/queue-5.4/series b/queue-5.4/series index fd03a943924..a035ab6b708 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -32,7 +32,6 @@ rdma-hfi1-correct-an-interlock-issue-for-tid-rdma-write-request.patch ext4-fix-checking-of-directory-entry-validity-for-inline-directories.patch jbd2-add-the-missing-unlock_buffer-in-the-error-path-of-jbd2_write_superblock.patch scsi-zfcp-fix-use-after-free-in-request-timeout-handlers.patch -mm-memory.c-skip-spurious-tlb-flush-for-retried-page-fault.patch drm-amdgpu-display-use-gfp_atomic-in-dcn20_validate_bandwidth_internal.patch drm-amd-display-fix-edid-parsing-after-resume-from-suspend.patch drm-amd-display-fix-pow-crashing-when-given-base-0.patch