The patch titled Subject: oom, memcg: clarify root memcg oom accounting has been removed from the -mm tree. Its filename was mm-oom-docs-describe-the-cgroup-aware-oom-killer-fix-2.patch This patch was dropped because it was folded into mm-oom-docs-describe-the-cgroup-aware-oom-killer.patch ------------------------------------------------------ From: Michal Hocko <mhocko@xxxxxxxx> Subject: oom, memcg: clarify root memcg oom accounting David Rientjes has pointed out that the current way how the root memcg is accounted for the cgroup aware OOM killer is undocumented. Unlike regular cgroups there is no accounting going on in the root memcg (mostly for performance reasons). Therefore we are suming up oom_badness of its tasks. This might result in an over accounting because of the oom_score_adj setting. Document this for now. Link: http://lkml.kernel.org/r/20180130122011.GB21609@xxxxxxxxxxxxxx Signed-off-by: Michal Hocko <mhocko@xxxxxxxx> Acked-by: Roman Gushchin <guro@xxxxxx> Acked-by: Tejun Heo <tj@xxxxxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Vladimir Davydov <vdavydov.dev@xxxxxxxxx> Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/admin-guide/cgroup-v2.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/Documentation/admin-guide/cgroup-v2.rst~mm-oom-docs-describe-the-cgroup-aware-oom-killer-fix-2 +++ a/Documentation/admin-guide/cgroup-v2.rst @@ -1347,8 +1347,15 @@ This affects both system- and cgroup-wid the memory controller considers only cgroups belonging to the sub-tree of the OOM'ing cgroup. -The root cgroup is treated as a leaf memory cgroup, so it's compared -with other leaf memory cgroups and cgroups with oom_group option set. +Leaf cgroups and cgroups with oom_group option set are compared based +on their cumulative memory usage. The root cgroup is treated as a +leaf memory cgroup as well, so it's compared with other leaf memory +cgroups. Due to internal implementation restrictions the size of +the root cgroup is a cumulative sum of oom_badness of all its tasks +(in other words oom_score_adj of each task is obeyed). Relying on +oom_score_adj (appart from OOM_SCORE_ADJ_MIN) can lead to over or +underestimating of the root cgroup consumption and it is therefore +discouraged. This might change in the future, though. If there are no cgroups with the enabled memory controller, the OOM killer is using the "traditional" process-based approach. _ Patches currently in -mm which might be from mhocko@xxxxxxxx are mm-drop-vm_bug_on-from-__get_free_pages.patch memcg-oom-move-out_of_memory-back-to-the-charge-path.patch mm-oom-remove-sleep-from-under-oom_lock.patch mm-oom-document-oom_lock.patch mm-oom-distinguish-blockable-mode-for-mmu-notifiers.patch mm-oom-remove-oom_lock-from-oom_reaper.patch mm-oom-add-cgroup-v2-mount-option-for-cgroup-aware-oom-killer.patch mm-oom-docs-describe-the-cgroup-aware-oom-killer.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html