linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH] memcg: make memcg's file mapped consistent with global VM
Date: Wed, 28 Oct 2009 16:44:30 +0900	[thread overview]
Message-ID: <20091028164430.bc660f25.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20091028073212.GO16378@balbir.in.ibm.com>

On Wed, 28 Oct 2009 13:02:12 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * 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.

I recommend you to start from adding new statistics to global VM to show that.
(Then, we don't need to say "this is a special counter for memcg.....)

> For now, I
> want to focus on testing memcg a bit more and start looking at some
> aspects of dirty accounting.
> 
I'm now cleaning up and test array counter (I posted before.) which works as
vm_stat[] for memcg. Maybe it will be useful.

A bit off-topic, let me show my current TO-DO-LIST.

  - implementing a counter like vm_stat[]
  - wait for Nishimura's task move patches.
  - implementing dirty_page accounting in very simple style.
  - implementing dirty_page limiting or kicking flusher thread for memcg.
  - fix oom-killer related things.
  - some necessary clean-ups.
  - implementing memory usage notifier or oom-notifier to userland.
  - helping I/O controller for buffered I/O tracking.

Because I don't fix priority of each jobs, someone unknown may finish
before I start ;)

Thanks,
-Kame



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2009-10-28  7:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28  3:16 KAMEZAWA Hiroyuki
2009-10-28  6:37 ` Daisuke Nishimura
2009-10-28  7:18 ` Balbir Singh
2009-10-28  7:24   ` KAMEZAWA Hiroyuki
2009-10-28  7:32     ` Balbir Singh
2009-10-28  7:44       ` KAMEZAWA Hiroyuki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091028164430.bc660f25.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nishimura@mxp.nes.nec.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox