Re: [RFC] Shared page accounting for memory cgroup
From: KAMEZAWA Hiroyuki
Date: Wed Jan 20 2010 - 20:34:20 EST
On Thu, 21 Jan 2010 10:04:16 +0900
Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> wrote:
> Anyway, I wouldn't say any more about the usefullness of "shared_usage_in_bytes".
> But if you dare to add this interface to kernel, please and please write the documentation
> that it can be used to roughly estimate a sum of i) and ii), not sum of i) and iii), and
> can be used to decide the weight of the group only when few pages are shared between groups.
> So that users doesn't misunderstand nor misuse the interface.
> And I think you should answer what Kamezawa-san pointed in http://lkml.org/lkml/2010/1/17/186.
I wouldn't like to say anything other than 'please add stat to global VM before
memcg if it's really important" because it seems I couldn't persuade him, he can't
do so me. I myself never think sum of rss is important.
An additonal craim I can easily think of is fork()->exit().
Assume there is a program with 1GB RSS and which invokes a helper program by
fork()->exec(). This is an usual situation. Then, sum of RSS can easily
jump up/down 1GB.
Even if getting data in atomic way, the data itself can be corrupted very
easily and the users should remove noises by themselves. So, there is no much
difference to calculate RSS in user land or kernel. The users has to measure
the status and estimate the stable value in statical technique.
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/