[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080630114439.da792361.kamezawa.hiroyu@jp.fujitsu.com>
Date: Mon, 30 Jun 2008 11:44:39 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Hugh Dickins <hugh@...itas.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Rik van Riel <riel@...hat.com>,
Lee Schermerhorn <lee.schermerhorn@...com>,
Balbir Singh <balbir@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] splitlru: memcg swapbacked pages active
On Sun, 29 Jun 2008 01:22:22 +0100 (BST)
Hugh Dickins <hugh@...itas.com> wrote:
> add_to_page_cache_lru puts PageSwapBacked pages on the active_anon lru,
> so shouldn't mem_cgroup_charge_common mirror that by setting FLAG_ACTIVE?
>
> Signed-off-by: Hugh Dickins <hugh@...itas.com>
> ---
> Should follow mmotm's vmscan-split-lru-lists-into-anon-file-sets.patch
>
> mm/memcontrol.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- mmotm/mm/memcontrol.c 2008-06-27 13:39:20.000000000 +0100
> +++ linux/mm/memcontrol.c 2008-06-27 17:32:29.000000000 +0100
> @@ -560,6 +560,8 @@ static int mem_cgroup_charge_common(stru
> pc->flags = PAGE_CGROUP_FLAG_CACHE;
> if (page_is_file_cache(page))
> pc->flags |= PAGE_CGROUP_FLAG_FILE;
> + else
> + pc->flags |= PAGE_CGROUP_FLAG_ACTIVE;
> } else
> pc->flags = PAGE_CGROUP_FLAG_ACTIVE;
>
>
Hmm, maybe no trouble but we'll have to care shmem's page is not marked as
PAGE_CGROUP_FLAG_CACHE but charged by mem_cgroup_charge_cache_page().
(I think why shmem is charged as cache is because shmem is used for tmpfs)
pc->flags |= PAGE_CGROUP_FLAG_FILE | PAGE_CGROUP_FLAG_ACTIVE;
is bad ? (or not work ? I can't catch yet.)
And we have to change this again ;)
==
[MEM_CGROUP_STAT_RSS] = { "anon/swapcache", PAGE_SIZE, },
==
Thanks,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists