From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH v3 -mmotm 2/2] memcg: move charge of file pages
Date: Thu, 8 Apr 2010 15:44:34 +0900 [thread overview]
Message-ID: <20100408154434.0f87bddf.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20100408141131.6bf5fd1a.nishimura@mxp.nes.nec.co.jp>
On Thu, 8 Apr 2010 14:11:31 +0900
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> This patch adds support for moving charge of file pages, which include normal
> file, tmpfs file and swaps of tmpfs file. It's enabled by setting bit 1 of
> <target cgroup>/memory.move_charge_at_immigrate. Unlike the case of anonymous
> pages, file pages(and swaps) in the range mmapped by the task will be moved even
> if the task hasn't done page fault, i.e. they might not be the task's "RSS",
> but other task's "RSS" that maps the same file. And mapcount of the page is
> ignored(the page can be moved even if page_mapcount(page) > 1). So, conditions
> that the page/swap should be met to be moved is that it must be in the range
> mmapped by the target task and it must be charged to the old cgroup.
>
> Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
> ---
> Documentation/cgroups/memory.txt | 12 ++++++--
> include/linux/swap.h | 5 +++
> mm/memcontrol.c | 55 +++++++++++++++++++++++++++++--------
> mm/shmem.c | 37 +++++++++++++++++++++++++
> 4 files changed, 94 insertions(+), 15 deletions(-)
>
> diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
> index 1b5bd04..13d40e7 100644
> --- a/Documentation/cgroups/memory.txt
> +++ b/Documentation/cgroups/memory.txt
> @@ -461,14 +461,20 @@ charges should be moved.
> 0 | A charge of an anonymous page(or swap of it) used by the target task.
> | Those pages and swaps must be used only by the target task. You must
> | enable Swap Extension(see 2.4) to enable move of swap charges.
> + -----+------------------------------------------------------------------------
> + 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory)
> + | and swaps of tmpfs file) mmaped by the target task. Unlike the case of
> + | anonymous pages, file pages(and swaps) in the range mmapped by the task
> + | will be moved even if the task hasn't done page fault, i.e. they might
> + | not be the task's "RSS", but other task's "RSS" that maps the same file.
> + | And mapcount of the page is ignored(the page can be moved even if
> + | page_mapcount(page) > 1). You must enable Swap Extension(see 2.4) to
> + | enable move of swap charges.
>
> Note: Those pages and swaps must be charged to the old cgroup.
> -Note: More type of pages(e.g. file cache, shmem,) will be supported by other
> - bits in future.
>
About both of documenataion for 0 and 1, I think following information is omitted.
"An account of a page of task is moved only when it's under task's current memory cgroup."
Plz add somewhere easy-to-be-found.
But ok, the patch itself much simpler. Thank you for your patient works!
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
--
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>
next prev parent reply other threads:[~2010-04-08 6:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 5:09 [PATCH v3 -mmotm 0/2] memcg: move charge of file cache/shmem Daisuke Nishimura
2010-04-08 5:10 ` [PATCH v3 -mmotm 1/2] memcg: clean up move charge Daisuke Nishimura
2010-04-08 6:32 ` KAMEZAWA Hiroyuki
2010-05-10 22:25 ` Andrew Morton
2010-05-10 23:54 ` KAMEZAWA Hiroyuki
2010-05-11 1:16 ` Daisuke Nishimura
2010-04-08 5:11 ` [PATCH v3 -mmotm 2/2] memcg: move charge of file pages Daisuke Nishimura
2010-04-08 6:44 ` KAMEZAWA Hiroyuki [this message]
2010-04-08 8:08 ` [PATCH v3.1 " Daisuke Nishimura
2010-04-08 8:56 ` KAMEZAWA Hiroyuki
2010-05-11 22:09 ` Andrew Morton
2010-04-08 6:15 ` [PATCH v3 -mmotm 0/2] memcg: move charge of file cache/shmem KAMEZAWA Hiroyuki
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=20100408154434.0f87bddf.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--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