Re: [PATCH] memcg: drain all stocks for the cgroup before read usage

From: Johannes Weiner
Date: Thu Sep 08 2011 - 06:09:42 EST


On Thu, Sep 08, 2011 at 03:49:07AM +0300, Kirill A. Shutemov wrote:
> On Thu, Sep 08, 2011 at 09:19:14AM +0900, KAMEZAWA Hiroyuki wrote:
> > > Should we have field 'ram' (or 'memory') for rss+cache in memory.stat?
> >
> > Why do you think so ?
>
> It may be useful for scripting purpose. Just an idea.

$ awk '/^cache/{mem+=$2} /^rss/{mem+=$2} END{print(mem)}' /sys/fs/cgroup/memory/memory.stat
1904500736

Am I missing something here?
--
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/