Re: [PATCH] Add file based RSS accounting for memory resourcecontroller (v2)

From: KAMEZAWA Hiroyuki
Date: Thu Apr 16 2009 - 20:19:21 EST


On Fri, 17 Apr 2009 09:14:59 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> page_cgroup->mem_cgroup != try_get_mem_cgroup_from_mm(mm); in many many cases.
>
> For example, libc and /bin/*** is tend to be loaded into default cgroup at boot but
> used by many cgroups. But mapcount of page caches for /bin/*** is 0 if not running.
>
> Then, File_Mapped can be greater than Cached easily if you use mm->owner.
>
> I can't estimate RSS in *my* cgroup if File_Mapped includes pages which is under
> other cgroups. It's meaningless.
> Especially, when Cached==0 but File_Mapped > 0, I think "oh, the kernel leaks somehing..hmm..."
>
> By useing page_cgroup->mem_cgroup, we can avoid above mess.
>
And, if pc->mem_cgroup is used, we can ignore "task move".

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/