linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCH] mm,page_alloc: Split stall warning and failure warning.
Date: Mon, 17 Apr 2017 15:48:33 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1704171539190.46404@chino.kir.corp.google.com> (raw)
In-Reply-To: <20170410150308.c6e1a0213c32e6d587b33816@linux-foundation.org>

On Mon, 10 Apr 2017, Andrew Morton wrote:

> I interpret __GFP_NOWARN to mean "don't warn about this allocation
> attempt failing", not "don't warn about anything at all".  It's a very
> minor issue but yes, methinks that stall warning should still come out.
> 

Agreed, and we have found this to be helpful in automated memory stress 
tests.

I agree that masking off __GFP_NOWARN and then reporting the gfp_mask to 
the user is only harmful.  If the allocation stalls vs allocation failure 
warnings are separated such as you have done, it is easily preventable.

I have a couple of suggestions for Tetsuo about this patch, though:

 - We now have show_mem_rs, stall_rs, and nopage_rs.  Ugh.  I think it's
   better to get rid of show_mem_rs and let warn_alloc_common() not 
   enforce any ratelimiting at all and leave it to the callers.

 - warn_alloc() is probably better off renamed to warn_alloc_failed()
   since it enforces __GFP_NOWARN and uses an allocation failure ratelimit 
   regardless of what the passed text is.

It may also be slightly off-topic, but I think it would be useful to print 
current's pid.  I find printing its parent's pid and comm helpful when 
using shared libraries, but you may not agree.

Otherwise, I think this is a good direction.

--
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>

  parent reply	other threads:[~2017-04-17 22:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 11:58 Tetsuo Handa
2017-04-10 12:39 ` Michal Hocko
2017-04-10 14:23   ` Tetsuo Handa
2017-04-10 22:03 ` Andrew Morton
2017-04-11  7:15   ` Michal Hocko
2017-04-11 11:43     ` Tetsuo Handa
2017-04-11 11:54       ` Michal Hocko
2017-04-11 13:26         ` Tetsuo Handa
2017-04-17 22:48   ` David Rientjes [this message]
2017-04-18 11:49     ` Tetsuo Handa
2017-04-18 12:14       ` Michal Hocko
2017-04-18 21:47       ` David Rientjes
2017-04-19 11:13         ` Michal Hocko
2017-04-19 13:22           ` Stanislaw Gruszka
2017-04-19 13:33             ` Michal Hocko
2017-04-22  8:10               ` Stanislaw Gruszka
2017-04-24  8:42                 ` Michal Hocko
2017-04-24 13:06                   ` Stanislaw Gruszka
2017-04-24 15:06                     ` Tetsuo Handa
2017-04-25  6:36                       ` Stanislaw Gruszka
2017-04-19 22:34             ` David Rientjes
2017-04-20 11:46         ` Tetsuo Handa

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.1704171539190.46404@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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