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

From: Balbir Singh
Date: Mon Feb 02 2009 - 09:12:59 EST


* KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/