+ mm-rate-limit-allocation-failure-warnings-more-aggressively.patch added to -mm tree

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

 



The patch titled
     Subject: mm/page_alloc.c: ratelimit allocation failure warnings more aggressively
has been added to the -mm tree.  Its filename is
     mm-rate-limit-allocation-failure-warnings-more-aggressively.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-rate-limit-allocation-failure-warnings-more-aggressively.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-rate-limit-allocation-failure-warnings-more-aggressively.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/process/submit-checklist.rst when testing your code ***

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

------------------------------------------------------
From: Johannes Weiner <hannes@xxxxxxxxxxx>
Subject: mm/page_alloc.c: ratelimit allocation failure warnings more aggressively

While investigating a bug related to higher atomic allocation failures, we
noticed the failure warnings positively drowning the console, and in our
case trigger lockup warnings because of a serial console too slow to
handle all that output.

But even if we had a faster console, it's unclear what additional
information the current level of repetition provides.

Allocation failures happen for three reasons: The machine is OOM, the VM
is failing to handle reasonable requests, or somebody is making
unreasonable requests (and didn't acknowledge their opportunism with
__GFP_NOWARN).  Having the memory dump, a callstack, and the ratelimit
stats on skipped failure warnings should provide enough information to let
users/admins/developers know whether something is wrong and point them in
the right direction for debugging, bpftracing etc.

Limit allocation failure warnings to 1 spew every ten seconds.

Link: http://lkml.kernel.org/r/20191028194906.26899-1-hannes@xxxxxxxxxxx
Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page_alloc.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/mm/page_alloc.c~mm-rate-limit-allocation-failure-warnings-more-aggressively
+++ a/mm/page_alloc.c
@@ -3728,10 +3728,6 @@ try_this_zone:
 static void warn_alloc_show_mem(gfp_t gfp_mask, nodemask_t *nodemask)
 {
 	unsigned int filter = SHOW_MEM_FILTER_NODES;
-	static DEFINE_RATELIMIT_STATE(show_mem_rs, HZ, 1);
-
-	if (!__ratelimit(&show_mem_rs))
-		return;
 
 	/*
 	 * This documents exceptions given to allocations in certain
@@ -3752,8 +3748,7 @@ void warn_alloc(gfp_t gfp_mask, nodemask
 {
 	struct va_format vaf;
 	va_list args;
-	static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL,
-				      DEFAULT_RATELIMIT_BURST);
+	static DEFINE_RATELIMIT_STATE(nopage_rs, 10*HZ, 1);
 
 	if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs))
 		return;
_

Patches currently in -mm which might be from hannes@xxxxxxxxxxx are

mm-rate-limit-allocation-failure-warnings-more-aggressively.patch
mm-memcontrol-remove-dead-code-from-memory_max_write.patch
mm-memcontrol-try-harder-to-set-a-new-memoryhigh.patch
mm-drop-mmap_sem-before-calling-balance_dirty_pages-in-write-fault.patch




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

  Powered by Linux