All of lore.kernel.org
 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,
	hannes@cmpxchg.org, mhocko@kernel.org, sgruszka@redhat.com
Subject: Re: [PATCH] mm,page_alloc: Split stall warning and failure warning.
Date: Tue, 18 Apr 2017 14:47:32 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1704181435560.112481@chino.kir.corp.google.com> (raw)
In-Reply-To: <201704182049.BIE34837.FJOFOMFOQSLHVt@I-love.SAKURA.ne.jp>

On Tue, 18 Apr 2017, Tetsuo Handa wrote:

> > 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.
> 
> Commit aa187507ef8bb317 ("mm: throttle show_mem() from warn_alloc()") says
> that show_mem_rs was added because a big part of the output is show_mem()
> which can generate a lot of output even on a small machines. Thus, I think
> ratelimiting at warn_alloc_common() makes sense for users who want to use
> warn_alloc_stall() for reporting stalls.
> 

The suggestion is to eliminate show_mem_rs, it has an interval of HZ and 
burst of 1 when the calling function(s), warn_alloc() and 
warn_alloc_stall(), will have intervals of 5 * HZ and burst of 10.  We 
don't need show_mem_rs :)

> >  - 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.
> 
> I'm OK to rename warn_alloc() back to warn_alloc_failed() for reporting
> allocation failures. Maybe we can remove debug_guardpage_minorder() > 0
> check from warn_alloc_failed() anyway.
> 

s/warn_alloc/warn_alloc_failed/ makes sense because the function is 
warning of allocation failures, not warning of allocations lol.

I think the debug_guardpage_minorder() check makes sense for failed 
allocations because we are essentially removing memory from the system for 
debug, failed allocations as a result of low on memory or fragmentation 
aren't concerning if we are removing memory from the system.  It isn't 
needed for allocation stalls, though, if the guard pages were actually 
mapped memory in use we would still be concerned about lengthy allocation 
stalls.  So I think we should have a debug_guardpage_minorder() check for 
warn_alloc_failed() and not for warn_alloc_stall().

If you choose to follow-up with this, I'd happily ack it.

--
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-18 21:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 11:58 [PATCH] mm,page_alloc: Split stall warning and failure warning 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
2017-04-18 11:49     ` Tetsuo Handa
2017-04-18 12:14       ` Michal Hocko
2017-04-18 21:47       ` David Rientjes [this message]
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.1704181435560.112481@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 \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.