lkml.org 
[lkml]   [2009]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-mm patch] Show memcg information during OOM
> > > 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.


Thanks,
Daisuke Nishimura.


\
 
 \ /
  Last update: 2009-02-03 07:03    [W:0.152 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site