+ mmoom-do-not-loop-__gfp_fs-allocation-if-the-oom-killer-is-disabled.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm,oom: do not loop !__GFP_FS allocation if the OOM killer is disabled.
has been added to the -mm tree.  Its filename is
     mmoom-do-not-loop-__gfp_fs-allocation-if-the-oom-killer-is-disabled.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mmoom-do-not-loop-__gfp_fs-allocation-if-the-oom-killer-is-disabled.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mmoom-do-not-loop-__gfp_fs-allocation-if-the-oom-killer-is-disabled.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Subject: mm,oom: do not loop !__GFP_FS allocation if the OOM killer is disabled.

After the OOM killer is disabled during suspend operation, any
!__GFP_NOFAIL && __GFP_FS allocations are forced to fail.  Thus, any
!__GFP_NOFAIL && !__GFP_FS allocations should be forced to fail as well.

Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page_alloc.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN mm/page_alloc.c~mmoom-do-not-loop-__gfp_fs-allocation-if-the-oom-killer-is-disabled mm/page_alloc.c
--- a/mm/page_alloc.c~mmoom-do-not-loop-__gfp_fs-allocation-if-the-oom-killer-is-disabled
+++ a/mm/page_alloc.c
@@ -2761,8 +2761,12 @@ __alloc_pages_may_oom(gfp_t gfp_mask, un
 			 * XXX: Page reclaim didn't yield anything,
 			 * and the OOM killer can't be invoked, but
 			 * keep looping as per tradition.
+			 *
+			 * But do not keep looping if oom_killer_disable()
+			 * was already called, for the system is trying to
+			 * enter a quiescent state during suspend.
 			 */
-			*did_some_progress = 1;
+			*did_some_progress = !oom_killer_disabled;
 			goto out;
 		}
 		if (pm_suspended_storage())
_

Patches currently in -mm which might be from penguin-kernel@xxxxxxxxxxxxxxxxxxx are

mmoom-make-oom_killer_disable-killable.patch
mmoom-do-not-loop-__gfp_fs-allocation-if-the-oom-killer-is-disabled.patch
kernel-hung_taskc-use-timeout-diff-when-timeout-is-updated.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux