lkml.org 
[lkml]   [2011]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 3/8] mm: memcg: clean up fault accounting
On Thu, Nov 24, 2011 at 10:33:49AM +0100, Michal Hocko wrote:
> On Wed 23-11-11 16:42:26, Johannes Weiner wrote:
> > From: Johannes Weiner <jweiner@redhat.com>
> >
> > The fault accounting functions have a single, memcg-internal user, so
> > they don't need to be global. In fact, their one-line bodies can be
> > directly folded into the caller.
>
> At first I thought that this doesn't help much because the generated
> code should be exactly same but thinking about it some more it makes
> sense.
> We should have a single place where we account for events. Maybe we
> should include also accounting done in mem_cgroup_charge_statistics
> (this would however mean that mem_cgroup_count_vm_event would have to be
> split). What do you think?

I'm all for unifying all the stats crap into a single place.
Optimally, we should have been able to put memcg hooks below
count_vm_event* but maybe that ship has sailed with PGPGIN/PGPGOUT
having different meanings between memcg and the rest of the system :/

Anything in that direction is improvement, IMO.

> > And since faults happen one at a time, use this_cpu_inc() directly
> > instead of this_cpu_add(foo, 1).
>
> The generated code will be same but it is easier to read, so agreed.

And it fits within 80 columns :-)

> > Signed-off-by: Johannes Weiner <jweiner@redhat.com>
>
> Anyway
> Acked-by: Michal Hocko <mhocko@suse.cz>

Thanks.


\
 
 \ /
  Last update: 2011-11-24 10:53    [W:0.070 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site