From: Greg Kroah-Hartman Date: Mon, 12 Apr 2021 07:14:38 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.19.187~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=326f3e5e0141782dae415a567f825f9ba377e22c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: mm-add-cond_resched-in-gather_pte_stats.patch --- diff --git a/queue-4.9/mm-add-cond_resched-in-gather_pte_stats.patch b/queue-4.9/mm-add-cond_resched-in-gather_pte_stats.patch new file mode 100644 index 00000000000..ce4f1eae895 --- /dev/null +++ b/queue-4.9/mm-add-cond_resched-in-gather_pte_stats.patch @@ -0,0 +1,41 @@ +From a66c0410b97c07a5708881198528ce724f7a3226 Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Mon, 12 Dec 2016 16:44:47 -0800 +Subject: mm: add cond_resched() in gather_pte_stats() + +From: Hugh Dickins + +commit a66c0410b97c07a5708881198528ce724f7a3226 upstream. + +The other pagetable walks in task_mmu.c have a cond_resched() after +walking their ptes: add a cond_resched() in gather_pte_stats() too, for +reading /proc//numa_maps. Only pagemap_pmd_range() has a +cond_resched() in its (unusually expensive) pmd_trans_huge case: more +should probably be added, but leave them unchanged for now. + +Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1612052157400.13021@eggly.anvils +Signed-off-by: Hugh Dickins +Acked-by: Michal Hocko +Cc: David Rientjes +Cc: Gerald Schaefer +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Reported-by: Chen si +Signed-off-by: Baoyou Xie +Signed-off-by: Wen Yang +Signed-off-by: Zijiang Huang +Signed-off-by: Greg Kroah-Hartman +--- + fs/proc/task_mmu.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/proc/task_mmu.c ++++ b/fs/proc/task_mmu.c +@@ -1609,6 +1609,7 @@ static int gather_pte_stats(pmd_t *pmd, + + } while (pte++, addr += PAGE_SIZE, addr != end); + pte_unmap_unlock(orig_pte, ptl); ++ cond_resched(); + return 0; + } + #ifdef CONFIG_HUGETLB_PAGE diff --git a/queue-4.9/series b/queue-4.9/series index 17a02acd782..22f3ca947f5 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -24,3 +24,4 @@ workqueue-move-the-position-of-debug_work_activate-i.patch s390-cpcmd-fix-inline-assembly-register-clobbering.patch rdma-cxgb4-check-for-ipv6-address-properly-while-des.patch clk-socfpga-fix-iomem-pointer-cast-on-64-bit.patch +mm-add-cond_resched-in-gather_pte_stats.patch