[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0902022203400.31820@chino.kir.corp.google.com>
Date: Mon, 2 Feb 2009 22:04:05 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
cc: Balbir Singh <balbir@...ux.vnet.ibm.com>,
Johannes Weiner <hannes@...xchg.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"lizf@...fujitsu.com" <lizf@...fujitsu.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [-mm patch] Show memcg information during OOM
On Tue, 3 Feb 2009, Daisuke Nishimura wrote:
> > > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> > > > index d3b9bac..b8e53ae 100644
> > > > --- a/mm/oom_kill.c
> > > > +++ b/mm/oom_kill.c
> > > > @@ -392,6 +392,7 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
> > > > current->comm, gfp_mask, order, current->oomkilladj);
> > > > task_lock(current);
> > > > cpuset_print_task_mems_allowed(current);
> > > > + mem_cgroup_print_mem_info(mem);
> > >
> > > mem is only !NULL when we come from mem_cgroup_out_of_memory(). This
> > > crashes otherwise in mem_cgroup_print_mem_info(), no?
> > >
> > I think you're right.
> >
> > IMHO, "mem_cgroup_print_mem_info(current)" would be better here,
> > and call mem_cgroup_from_task at mem_cgroup_print_mem_info.
> >
> Reading other messages on this thread, mem_cgroup_print_mem_info
> should be called only when oom_kill_process is called from mem_cgroup_out_of_memory,
> so checking "if (!mem)" would be enough.
>
You're right, but it's understandable why there would be confusion since
it's very poorly documented.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists