[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation
KAMEZAWA Hiroyuki
kamezawa.hiroyu at jp.fujitsu.com
Wed Mar 3 19:45:05 PST 2010
On Wed, 3 Mar 2010 23:03:19 +0100
Andrea Righi <arighi at develer.com> wrote:
> On Wed, Mar 03, 2010 at 05:21:32PM +0900, KAMEZAWA Hiroyuki wrote:
> > On Wed, 3 Mar 2010 15:15:49 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> > + preempt_disable();
> > + lock_page_cgroup_migrate(pc);
> > page = pc->page;
> > if (page_mapped(page) && !PageAnon(page)) {
> > /* Update mapped_file data for mem_cgroup */
> > - preempt_disable();
> > __this_cpu_dec(from->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]);
> > __this_cpu_inc(to->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]);
> > - preempt_enable();
> > }
> > mem_cgroup_charge_statistics(from, pc, false);
> > + move_acct_information(from, to, pc);
>
> Kame-san, a question. According to is_target_pte_for_mc() it seems we
> don't move file pages across cgroups for now.
yes. It's just in plan.
> If !PageAnon(page) we just return 0 and the page won't be selected for migration in
> mem_cgroup_move_charge_pte_range().
>
> So, if I've understood well the code is correct in perspective, but
> right now it's unnecessary. File pages are not moved on task migration
> across cgroups and, at the moment, there's no way for file page
> accounted statistics to go negative.
>
> Or am I missing something?
>
At rmdir(), remainging file caches in a cgroup is moved to
its parent. Then, all file caches are moved to its parent at rmdir().
This behavior is for avoiding to lose too much file caches at removing cgroup.
Thanks,
-Kame
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list