commit 0428a8cef7f8cd3055dc7d92f0a9310f8c3f7c62
Author: Arkadiusz MiĆkiewicz <[email protected]>
Date: Sat Feb 6 01:14:17 2016 +0100
- one more mm fix
kernel-small_fixes.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
---
diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch
index 92cfb5e..c13521f 100644
--- a/kernel-small_fixes.patch
+++ b/kernel-small_fixes.patch
@@ -398,3 +398,50 @@ index aa67339..4f18fd9 100644
if (tout && tout <= 20)
--
2.5.0
+From: Tetsuo Handa <[email protected]>
+Subject: mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any
progress
+
+Jan Stancek has reported that system occasionally hanging after "oom01"
+testcase from LTP triggers OOM. Guessing from a result that there is a
+kworker thread doing memory allocation and the values between "Node 0
+Normal free:" and "Node 0 Normal:" differs when hanging, vmstat is not
+up-to-date for some reason.
+
+According to commit 373ccbe59270 ("mm, vmstat: allow WQ concurrency to
+discover memory reclaim doesn't make any progress"), it meant to force the
+kworker thread to take a short sleep, but it by error used
+schedule_timeout(1). We missed that schedule_timeout() in state
+TASK_RUNNING doesn't do anything.
+
+Fix it by using schedule_timeout_uninterruptible(1) which forces the
+kworker thread to take a short sleep in order to make sure that vmstat is
+up-to-date.
+
+Fixes: 373ccbe59270 ("mm, vmstat: allow WQ concurrency to discover memory
reclaim doesn't make any progress")
+Signed-off-by: Tetsuo Handa <[email protected]>
+Reported-by: Jan Stancek <[email protected]>
+Acked-by: Michal Hocko <[email protected]>
+Cc: Tejun Heo <[email protected]>
+Cc: Cristopher Lameter <[email protected]>
+Cc: Joonsoo Kim <[email protected]>
+Cc: Arkadiusz Miskiewicz <[email protected]>
+Cc: <[email protected]>
+Signed-off-by: Andrew Morton <[email protected]>
+---
+
+ mm/backing-dev.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff -puN
mm/backing-dev.c~mm-vmstat-fix-wrong-wq-sleep-when-memory-reclaim-doesnt-make-any-progress
mm/backing-dev.c
+---
a/mm/backing-dev.c~mm-vmstat-fix-wrong-wq-sleep-when-memory-reclaim-doesnt-make-any-progress
++++ a/mm/backing-dev.c
+@@ -989,7 +989,7 @@ long wait_iff_congested(struct zone *zon
+ * here rather than calling cond_resched().
+ */
+ if (current->flags & PF_WQ_WORKER)
+- schedule_timeout(1);
++ schedule_timeout_uninterruptible(1);
+ else
+ cond_resched();
+
+_
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/0428a8cef7f8cd3055dc7d92f0a9310f8c3f7c62
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit