linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: ZhangNeil <neilzhang1123@hotmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: RE: [PATCH v2] mm: show free pages per each migrate type
Date: Mon, 13 Apr 2015 16:42:56 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1504131639290.20336@chino.kir.corp.google.com> (raw)
In-Reply-To: <COL130-W77A7613DB3EA1820D92CBABAF80@phx.gbl>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1920 bytes --]

On Sun, 12 Apr 2015, ZhangNeil wrote:

> > Sorry, this is just way too verbose. This output is emitted to the kernel
> > log on oom kill and since we lack a notification mechanism on system oom,
> > the _only_ way for userspace to detect oom kills that have occurred is by
> > scraping the kernel log. This is exactly what we do, and we have missed
> > oom kill events because they scroll from the ring buffer due to excessive
> > output such as this, which is why output was limited with the
> > show_free_areas() filter in the first place. Just because oom kill output
> > is much less than it has been in the past, for precisely this reason,
> > doesn't mean we can make it excessive again.
> >
> 
> Just like you said, OOM kill is much less than before, but we still need to analyze it when 
> it happens on a mobile device. It can give more detailed info for us when debugging.
>  

There is a very large amount of data that would be true for, and we simply 
can't make oom killing more verbose in the kernel log because it is the 
_only_ mechanism we have to determine that the kernel killed a user 
process and what that process was.  You could make the same argument for 
dumping all of /proc/slabinfo, which people have proposed before and it's 
been nacked, to discover slab leaks.  We simply can't make it more 
verbose, it's that easy.

> Besides OOM kill, we also can check the memory usages in runtime by echo 'm' to sysRq.
> It can help us to  find out code defect sometimes, for example, we even found that the NR_FREE_CMA
> memory was not align with the total CMA pages in the free list showed by this patch.
> 

Sysrq is an entirely different usecase and the natural response would be 
to export this information for sysrq but not oom kill, but in this case 
there is no compelling reason to dump it in the ring buffer in the first 
place: it should be in procfs where it can easily be read and parsed.

      reply	other threads:[~2015-04-13 23:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  2:19 Neil Zhang
2015-04-09 20:47 ` Andrew Morton
2015-04-10  4:16   ` ZhangNeil
2015-04-10  4:24     ` Andrew Morton
2015-04-12  7:17       ` ZhangNeil
2015-04-12  7:25         ` Andrew Morton
2015-04-11  2:50 ` David Rientjes
2015-04-12  7:02   ` ZhangNeil
2015-04-12  7:08   ` ZhangNeil
2015-04-13 23:42     ` 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.1504131639290.20336@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=neilzhang1123@hotmail.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