linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: 禹舟键 <ufo19890607@gmail.com>
To: mhocko@kernel.org
Cc: akpm@linux-foundation.org, rientjes@google.com,
	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: Thu, 17 May 2018 17:44:43 +0800	[thread overview]
Message-ID: <CAHCio2gOLnj4NpkFrxpYVygg6ZeSeuwgp2Lwr6oTHRxHpbmcWw@mail.gmail.com> (raw)
In-Reply-To: <20180517071140.GQ12670@dhcp22.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 2049 bytes --]

Hi Michal
I think the current OOM report is imcomplete. I can get the task which
invoked the oom-killer and the task which has been killed by the
oom-killer, and memory info when the oom happened. But I cannot infer the
certain memcg to which the task killed by oom-killer belongs, because that
task has been killed, and the dump_task will print all of the tasks in the
system.

mem_cgroup_print_oom_info will print five lines of content including
memcg's name , usage, limit. I don't think five lines of content will cause
a big problem. Or it at least prints the memcg's name.

Thanks
Wind

Michal Hocko <mhocko@kernel.org> 于2018年5月17日周四 下午3:11写道:

> On Thu 17-05-18 08:00:28, ufo19890607 wrote:
> > From: yuzhoujian <yuzhoujian@didichuxing.com>
> >
> > The dump_header does not print the memcg's name when the system
> > oom happened. Some users want to locate the certain container
> > which contains the task that has been killed by the oom killer.
> > So I add the mem_cgroup_print_oom_info when system oom events
> > happened.
>
> The oom report is quite heavy today. Do we really need the full memcg
> oom report here. Wouldn't it be sufficient to print the memcg the task
> belongs to?
>
> > Signed-off-by: yuzhoujian <yuzhoujian@didichuxing.com>
> > ---
> >  mm/oom_kill.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> > index 8ba6cb88cf58..244416c9834a 100644
> > --- a/mm/oom_kill.c
> > +++ b/mm/oom_kill.c
> > @@ -433,6 +433,7 @@ static void dump_header(struct oom_control *oc,
> struct task_struct *p)
> >       if (is_memcg_oom(oc))
> >               mem_cgroup_print_oom_info(oc->memcg, p);
> >       else {
> > +             mem_cgroup_print_oom_info(mem_cgroup_from_task(p), p);
> >               show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
> >               if (is_dump_unreclaim_slabs())
> >                       dump_unreclaimable_slab();
> > --
> > 2.14.1
> >
>
> --
> Michal Hocko
> SUSE Labs
>

[-- Attachment #2: Type: text/html, Size: 2740 bytes --]

  reply	other threads:[~2018-05-17  9:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17  7:00 ufo19890607
2018-05-17  7:11 ` Michal Hocko
2018-05-17  9:44   ` 禹舟键 [this message]
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
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=CAHCio2gOLnj4NpkFrxpYVygg6ZeSeuwgp2Lwr6oTHRxHpbmcWw@mail.gmail.com \
    --to=ufo19890607@gmail.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=rientjes@google.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