From: David Rientjes <rientjes@google.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: 禹舟键 <ufo19890607@gmail.com>,
akpm@linux-foundation.org, kirill.shutemov@linux.intel.com,
aarcange@redhat.com, penguin-kernel@i-love.sakura.ne.jp,
guro@fb.com, yang.s@alibaba-inc.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
"Wind Yu" <yuzhoujian@didichuxing.com>
Subject: Re: [PATCH] Add the memcg print oom info for system oom
Date: Tue, 22 May 2018 15:54:01 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.21.1805221542540.83718@chino.kir.corp.google.com> (raw)
In-Reply-To: <20180522063742.GE20020@dhcp22.suse.cz>
On Tue, 22 May 2018, Michal Hocko wrote:
> > I've had success with defining a single line output the includes the
> > CONSTRAINT_* of the oom kill, the origin and kill memcgs, the thread name,
> > pid, and uid. On system oom kills, origin and kill memcgs are left empty.
> >
> > oom-kill constraint=CONSTRAINT_* origin_memcg=<memcg> kill_memcg=<memcg> task=<comm> pid=<pid> uid=<uid>
> >
> > Perhaps we should introduce a single line output that will be backwards
> > compatible that includes this information?
>
> I do not have a strong preference here. We already print cpuset on its
> own line and we can do the same for the memcg.
>
Yes, for both the memcg that has reached its limit (origin_memcg) and the
memcg the killed process is attached to (kill_memcg).
It's beneficial to have a single-line output to avoid any printk
interleaving or ratelimiting that includes the constraint, comm, and at
least pid. (We include uid simply to find oom kills of root processes.)
We already have all this information, including cpuset, cpuset nodemask,
and allocation nodemask for mempolicy ooms. The only exception appears to
be the kill_memcg for CONSTRAINT_NONE and for it to be emitted in a way
that can't be interleaved or suppressed.
Perhaps we can have this?
oom-kill constraint=CONSTRAINT_* nodemask=<cpuset/mempolicy nodemask> origin_memcg=<memcg> kill_memcg=<memcg> task=<comm> pid=<pid> uid=<uid>
For CONSTRAINT_NONE, nodemask and origin_memcg are empty. For
CONSTRAINT_CPUSET and CONSTRAINT_MEMORY_POLICY, origin_memcg is empty.
next prev parent reply other threads:[~2018-05-22 22:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 7:00 [PATCH] Add the memcg print oom info for system oom ufo19890607
2018-05-17 7:11 ` Michal Hocko
[not found] ` <CAHCio2gOLnj4NpkFrxpYVygg6ZeSeuwgp2Lwr6oTHRxHpbmcWw@mail.gmail.com>
2018-05-17 10:23 ` Michal Hocko
2018-05-17 10:42 ` Roman Gushchin
2018-05-21 21:11 ` David Rientjes
2018-05-22 6:37 ` Michal Hocko
2018-05-22 22:54 ` David Rientjes [this message]
2018-05-19 21:18 ` kbuild test robot
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.21.1805221542540.83718@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=ufo19890607@gmail.com \
--cc=yang.s@alibaba-inc.com \
--cc=yuzhoujian@didichuxing.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;
as well as URLs for NNTP newsgroup(s).