From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:44529 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504AbcBOSLp (ORCPT ); Mon, 15 Feb 2016 13:11:45 -0500 Subject: Patch "mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress" has been added to the 4.3-stable tree To: penguin-kernel@i-love.sakura.ne.jp, akpm@linux-foundation.org, arekm@maven.pl, clameter@sgi.com, gregkh@linuxfoundation.org, iamjoonsoo.kim@lge.com, jstancek@redhat.com, mhocko@suse.com, penguin-kernel@I-love.SAKURA.ne.jp, tj@kernel.org, torvalds@linux-foundation.org Cc: , From: Date: Mon, 15 Feb 2016 10:11:44 -0800 Message-ID: <145555990412189@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress to the 4.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mm-vmstat-fix-wrong-wq-sleep-when-memory-reclaim-doesn-t-make-any-progress.patch and it can be found in the queue-4.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 564e81a57f9788b1475127012e0fd44e9049e342 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Fri, 5 Feb 2016 15:36:30 -0800 Subject: mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress From: Tetsuo Handa commit 564e81a57f9788b1475127012e0fd44e9049e342 upstream. 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 Reported-by: Jan Stancek Acked-by: Michal Hocko Cc: Tejun Heo Cc: Cristopher Lameter Cc: Joonsoo Kim Cc: Arkadiusz Miskiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/backing-dev.c +++ b/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(); Patches currently in stable-queue which might be from penguin-kernel@i-love.sakura.ne.jp are queue-4.3/mm-oom_kill.c-reverse-the-order-of-setting-tif_memdie-and-sending-sigkill.patch queue-4.3/mm-vmstat-fix-wrong-wq-sleep-when-memory-reclaim-doesn-t-make-any-progress.patch