linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Christoph Lameter <cl@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Michal Hocko <mhocko@suse.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Stanislaw Gruszka <sgruszka@redhat.com>
Subject: Re: [PATCH v2] mm, page_alloc: Remove debug_guardpage_minorder() test in warn_alloc().
Date: Tue, 18 Apr 2017 16:10:35 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1704181604460.141160@chino.kir.corp.google.com> (raw)
In-Reply-To: <1492525366-4929-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>

On Tue, 18 Apr 2017, Tetsuo Handa wrote:

> Commit c0a32fc5a2e470d0 ("mm: more intensive memory corruption debugging")
> changed to check debug_guardpage_minorder() > 0 when reporting allocation
> failures. The reasoning was
> 
>   When we use guard page to debug memory corruption, it shrinks available
>   pages to 1/2, 1/4, 1/8 and so on, depending on parameter value.
>   In such case memory allocation failures can be common and printing
>   errors can flood dmesg. If somebody debug corruption, allocation
>   failures are not the things he/she is interested about.
> 
> but is misguided.
> 

As discussed privately, I think the reasoning is worthwhile.  
debug_guardpage_minorder is effectively pulling DIMMs from your system 
from the perspective of the buddy allocator, which triggers these 
warnings.  Nobody will be deploying with this config on production 
systems, they are interesting in debugging or triaging issues.  As a 
result, I agree that low on memory or fragmentation issues as a result of 
the overhead required for this debugging is not interesting to report.  

> Allocation requests with __GFP_NOWARN flag by definition do not cause
> flooding of allocation failure messages. Allocation requests with
> __GFP_NORETRY flag likely also have __GFP_NOWARN flag. Costly allocation
> requests likely also have __GFP_NOWARN flag.
> 
> Allocation requests without __GFP_DIRECT_RECLAIM flag likely also have
> __GFP_NOWARN flag or __GFP_HIGH flag. Non-costly allocation requests with
> __GFP_DIRECT_RECLAIM flag basically retry forever due to the "too small to
> fail" memory-allocation rule.
> 
> Therefore, as a whole, shrinking available pages by
> debug_guardpage_minorder= kernel boot parameter might cause flooding of
> OOM killer messages but unlikely causes flooding of allocation failure
> messages. Let's remove debug_guardpage_minorder() > 0 check which would
> likely be pointless.
> 

Hmm, not necessarily, the oom killer can be used in situations where the 
context allows it but there is still a great possibility that we are 
getting page allocation failure warnings in softirq context, including 
high-order allocations from the networking layer.  I think the reasoning 
presented by Stanislaw in commit c0a32fc5a2e4 is correct and we ought to 
avoid allocation failure warnings spamming the log when looking for real 
debugging information.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2017-04-18 23:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 14:22 Tetsuo Handa
2017-04-18 23:10 ` David Rientjes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1704181604460.141160@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=rjw@rjwysocki.net \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox