Re: [-mm patch] Show memcg information during OOM

Balbir Singh
2009-02-02T14:12:44Z

* KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> [2009-02-02 21:59:34]:

> Hi
>
> > +void mem_cgroup_print_mem_info(struct mem_cgroup *memcg)
> > +{
> > + printk(KERN_WARNING "Memory cgroups's name %s\n",
> > + memcg->css.cgroup->dentry->d_name.name);
> > + printk(KERN_WARNING "Memory cgroup RSS : usage %llu, limit %llu"
> > + " failcnt %llu\n", res_counter_read_u64(&memcg->res, RES_USAGE),
> > + res_counter_read_u64(&memcg->res, RES_LIMIT),
> > + res_counter_read_u64(&memcg->res, RES_FAILCNT));
> > + printk(KERN_WARNING "Memory cgroup swap: usage %llu, limit %llu "
> > + "failcnt %llu\n", res_counter_read_u64(&memcg->res, RES_USAGE),
> > + res_counter_read_u64(&memcg->res, RES_LIMIT),
> > + res_counter_read_u64(&memcg->res, RES_FAILCNT));
>
> s/res/memsw/ ?
>
> and, I don't like the name of "Memory cgroup RSS" and "Memory cgroup swap".
> it seems misleading. memcg->res doesn't only count count rss, but also cache.
> memcg->memsw doesn't only count swap, but also memory.
>
> otherthing, I think it is good patch for me :)
>

Good point, I fixed the res/memsw problem and sent out a patch. About
the RSS thing, not sure what to call it, just calling it memory can be
confusing, may be I should call it

Memory and Memory+swap

Thanks for the review

--
Balbir