]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Apr 2021 07:14:38 +0000 (09:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Apr 2021 07:14:38 +0000 (09:14 +0200)
added patches:
mm-add-cond_resched-in-gather_pte_stats.patch

queue-4.9/mm-add-cond_resched-in-gather_pte_stats.patch [new file with mode: 0644]
queue-4.9/series

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 (file)
index 0000000..ce4f1ea
--- /dev/null
@@ -0,0 +1,41 @@
+From a66c0410b97c07a5708881198528ce724f7a3226 Mon Sep 17 00:00:00 2001
+From: Hugh Dickins <hughd@google.com>
+Date: Mon, 12 Dec 2016 16:44:47 -0800
+Subject: mm: add cond_resched() in gather_pte_stats()
+
+From: Hugh Dickins <hughd@google.com>
+
+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/<id>/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 <hughd@google.com>
+Acked-by: Michal Hocko <mhocko@suse.com>
+Cc: David Rientjes <rientjes@google.com>
+Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Reported-by: Chen si <cici.cs@alibaba-inc.com>
+Signed-off-by: Baoyou Xie <baoyou.xie@aliyun.com>
+Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
+Signed-off-by: Zijiang Huang <zijiang.hzj@alibaba-inc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
index 17a02acd782a3468840b78f52131dd04feae05c7..22f3ca947f5e53b66eb9d6420fe7c2445db4250d 100644 (file)
@@ -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