On Wed, 25 Aug 2010 17:52:06 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
Hmm. I'll add a text like following to cgroup/memory.txt. O.K. ?
==
Notes on oom_score and oom_score_adj.
oom_score is calculated as
oom_score = (taks's proportion of memory) + oom_score_adj.
Then, when you use oom_score_adj to control the order of priority of oom,
you should know about the amount of memory you can use.
So, an approximate oom_score under memcg can be
memcg_oom_score = (oom_score - oom_score_adj) * system_memory/memcg's limit
+ oom_score_adj.
And yes, this can be affected by hierarchy control of memcg and calculation
will be more complicated. See, oom_disable feature also.
==
Thanks,
-Kame
--