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 (v3)
* Li Zefan <lizf@cn.fujitsu.com> [2009-02-04 08:53:59]:

> > @@ -104,6 +104,8 @@ struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg,
> > struct zone *zone);
> > struct zone_reclaim_stat*
> > mem_cgroup_get_reclaim_stat_from_page(struct page *page);
> > +extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
> > + struct task_struct *p);
> >
> > #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
> > extern int do_swap_account;
> > @@ -270,6 +272,10 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page)
> > return NULL;
> > }
> >
> > +void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
> > +{
>
> should be static inline, otherwise it won't compile if CONFIG_CGROUP_MEM_CONT=n
>

Oh! yes.

> > +}
> > +
> > #endif /* CONFIG_CGROUP_MEM_CONT */
> >
>
> > +void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
> > +{
> > + struct cgroup *task_cgrp;
> > + struct cgroup *mem_cgrp;
> > + /*
> > + * Need a buffer on stack, can't rely on allocations. The code relies
>
> I think it's in .bss section, but not on stack, and it's better to explain why
> the static buffer is safe in the comment.
>

Yes, it is no longer on stack, in the original patch it was. I'll send
an updated patch

--
Balbir


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