lkml.org 
[lkml]   [2009]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memcg: make memcg's file mapped consistent with global VM
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-10-28 16:24:58]:

> On Wed, 28 Oct 2009 12:48:54 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-10-28 12:16:19]:
> >
> > > Based on mmotm-Oct13 + some patches in -mm queue.
> > >
> > > ==
> > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > >
> > > memcg-cleanup-file-mapped-consistent-with-globarl-vm-stat.patch
> > >
> > > In global VM, FILE_MAPPED is used but memcg uses MAPPED_FILE.
> > > This makes grep difficult. Replace memcg's MAPPED_FILE with FILE_MAPPED
> > >
> > > And in global VM, mapped shared memory is accounted into FILE_MAPPED.
> > > But memcg doesn't. fix it.
> >
> > I wanted to explicitly avoid this since I wanted to do an iterative
> > correct accounting of shared memory. The renaming is fine with me
> > since we don't break ABI in user space.
> >
> To do that, FILE_MAPPED is not correct.
> Because MAPPED includes shmem in global VM, no valid reason to do different
> style of counting.

OK, fair enough! Lets count shmem in FILE_MAPPED

>
> For shmem, we have a charge type as MEM_CGROUP_CHARGE_TYPE_SHMEM and
> we can set "PCG_SHMEM" flag onto page_cgroup or some.
> Then, we can count it in explicit way.
>

Apart from shmem, I want to count all memory that is shared (mapcount > 1),
I'll send out an RFC once I have the implementation. For now, I
want to focus on testing memcg a bit more and start looking at some
aspects of dirty accounting.

--
Balbir


\
 
 \ /
  Last update: 2009-10-28 08:35    [W:0.143 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site