linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: ufo19890607 <ufo19890607@gmail.com>,
	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,
	yuzhoujian <yuzhoujian@didichuxing.com>
Subject: Re: [PATCH v4] Print the memcg's name when system-wide OOM happened
Date: Thu, 31 May 2018 08:49:51 +0200	[thread overview]
Message-ID: <20180531064951.GG15278@dhcp22.suse.cz> (raw)
In-Reply-To: <20180530134256.bbf7a8639571a3f8910b6a05@linux-foundation.org>

On Wed 30-05-18 13:42:56, Andrew Morton wrote:
> On Mon, 21 May 2018 03:39:46 +0100 ufo19890607 <ufo19890607@gmail.com> wrote:
> 
> > From: yuzhoujian <yuzhoujian@didichuxing.com>
> > 
> > The dump_header does not print the memcg's name when the system
> > oom happened. So users cannot locate the certain container which
> > contains the task that has been killed by the oom killer.
> > 
> > System oom report will print the memcg's name after this patch,
> > so users can get the memcg's path from the oom report and check
> > the certain container more quickly.
> 
> lkp-robot is reporting an oops.
> 
> > --- 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_memcg_name(oc->memcg, p);
> >  		show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
> >  		if (is_dump_unreclaim_slabs())
> >  			dump_unreclaimable_slab();
> 
> static inline bool is_memcg_oom(struct oom_control *oc)
> {
> 	return oc->memcg != NULL;
> }
> 
> So in the mem_cgroup_print_oom_memcg_name() call which this patch adds,
> oc->memcg is known to be NULL.  How can this possibly work?  

This version is broken. The current version [1] seems to be doing the
right thing in that regards AFAICS. It has some other issues though.
Can we drop the current code from the mmotm tree and start over?

[1] http://lkml.kernel.org/r/1527413551-5982-1-git-send-email-ufo19890607@gmail.com
-- 
Michal Hocko
SUSE Labs

      reply	other threads:[~2018-05-31  6:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21  2:39 ufo19890607
2018-05-22  7:28 ` Michal Hocko
2018-05-30  7:52 ` [lkp-robot] [Print the memcg's name when system] c385a55f52: BUG:KASAN:null-ptr-deref_in_m kernel test robot
2018-05-30 20:42 ` [PATCH v4] Print the memcg's name when system-wide OOM happened Andrew Morton
2018-05-31  6:49   ` Michal Hocko [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=20180531064951.GG15278@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --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=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=rientjes@google.com \
    --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