Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1309632

Re: [PATCH 1/2] mm: memcontrol: basic memory statistics in cgroup2 memory controller

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mm: memcontrol: basic memory statistics in cgroup2 memory controller
Date 2016-01-14 21:30 +0100
Message-ID <qQWGS-3K7-9@gated-at.bofh.it> (permalink)
References <qQBM7-5Z4-43@gated-at.bofh.it> <qQBM8-5Z4-65@gated-at.bofh.it> <qQCoN-6fT-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jan 13, 2016 at 02:49:30PM -0800, Andrew Morton wrote:
> > @@ -5095,6 +5107,46 @@ static int memory_events_show(struct seq_file *m, void *v)
> >  	return 0;
> >  }
> >  
> > +static int memory_stat_show(struct seq_file *m, void *v)
> > +{
> > +	struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m));
> > +	int i;
> > +
> > +	/* Memory consumer totals */
> > +
> > +	seq_printf(m, "anon %lu\n",
> > +		   tree_stat(memcg, MEM_CGROUP_STAT_RSS) * PAGE_SIZE);
> 
> Is there any reason why this won't overflow a longword on 32-bit?

It will, I don't know what I was thinking there. Fixed in the update.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] mm: memcontrol: cgroup2 memory statistics Johannes Weiner <hannes@cmpxchg.org> - 2016-01-13 23:10 +0100
  [PATCH 1/2] mm: memcontrol: basic memory statistics in cgroup2 memory controller Johannes Weiner <hannes@cmpxchg.org> - 2016-01-13 23:10 +0100
    Re: [PATCH 1/2] mm: memcontrol: basic memory statistics in cgroup2  memory controller Andrew Morton <akpm@linux-foundation.org> - 2016-01-13 23:50 +0100
      Re: [PATCH 1/2] mm: memcontrol: basic memory statistics in cgroup2  memory controller Johannes Weiner <hannes@cmpxchg.org> - 2016-01-14 21:30 +0100
  Re: [PATCH 0/2] mm: memcontrol: cgroup2 memory statistics Andrew Morton <akpm@linux-foundation.org> - 2016-01-13 23:50 +0100
    Re: [PATCH 0/2] mm: memcontrol: cgroup2 memory statistics Johannes Weiner <hannes@cmpxchg.org> - 2016-01-14 21:30 +0100
      Re: [PATCH 0/2] mm: memcontrol: cgroup2 memory statistics Vladimir Davydov <vdavydov@virtuozzo.com> - 2016-01-15 11:00 +0100
        Re: [PATCH 0/2] mm: memcontrol: cgroup2 memory statistics Johannes Weiner <hannes@cmpxchg.org> - 2016-01-15 21:40 +0100

csiph-web