From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD12CC433E0 for ; Fri, 26 Feb 2021 16:42:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72C4B64F0D for ; Fri, 26 Feb 2021 16:42:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72C4B64F0D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 027C98D0001; Fri, 26 Feb 2021 11:42:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EF38B6B0070; Fri, 26 Feb 2021 11:42:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBB8A8D0001; Fri, 26 Feb 2021 11:42:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id C3A906B006C for ; Fri, 26 Feb 2021 11:42:42 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 82A51824805A for ; Fri, 26 Feb 2021 16:42:42 +0000 (UTC) X-FDA: 77860987764.12.7A3B7DF Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by imf24.hostedemail.com (Postfix) with ESMTP id F13FAA0004CF for ; Fri, 26 Feb 2021 16:42:35 +0000 (UTC) Received: by mail-ej1-f41.google.com with SMTP id hs11so15937662ejc.1 for ; Fri, 26 Feb 2021 08:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oJEVlbPPvFAyDZRVvcO+54tdbNeS7EYd7BewxLTv368=; b=qZAoRzlNqnM4lCeuT+0qeH/osuFKDkds9fOdHbG3O55HfQhmH4G1aYpQ79hcrN+Npg EL08UcuZvmID7f+0EZUGsIV6h8/zpWrkSSY01N5KKfADq4y2zvftjN4Cf21TK5ensKk/ OQgu/yH0lx5EhbR3ER6AhwYCFw6GzeBf9hAvVIybzbVuJ5y0dpS66myv5M7FqiXgLSMY WNG7IIjEuHfVPU1acE95up21jWXKlPwZfeBjSf+udQEX17+tlgkkp+KKO3xxhCCxLohg wC8fPusizxOA3O9003YKQHntLE9er5OMp85yCG2Opq9bQIfH+hQ8SFqwaVEHAeyT8TAP pzLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oJEVlbPPvFAyDZRVvcO+54tdbNeS7EYd7BewxLTv368=; b=iLd9fH4bDhWuC6tJWh2jM1isM7XuPKWAfsI6H+9evxKPHAt/MF8iL/KKimSLK4IxQx Z7Dr0n/vzwcu3+ot4dDDQz2Nk/eAz+fUOB4N5CtSaksTJy9cDVTCthBTdsRw+WnFeLps M0c8N7cmc8TIRztOzjG3+qAop9S6EWJWZ4FLRyqz2THGH0MiAg+6aIOAgMKDclLel2zh 5KskcLhMAlz6zhZLXezicNDIFuUNTYFQ8fFsvJ0B4BCb+DtAgeHsblQkGUknfBo7DO2a 70UlB2pU7igDQVdPlNfm7OiAVlAJdwJcA/oxCJtGP75wSf8GqZFLTRUZIBlrsQu7h6Yy KUxQ== X-Gm-Message-State: AOAM532hytA+Ksr4eE8O8jV2/D+sAif07EWEOrq0pu2Su4HzJhBbf0nf xOWVyswVYERQEvStkqv95K6Zc8rVVQ/TTqwcNiA= X-Google-Smtp-Source: ABdhPJyfpJRQybvYVt2aEILrzYV6SzoOhkjtBY/y1tuM5k989hMs5JVczVQRJjKjzt2QhR6XWUNsOnkBvJmpl9M3Pbs= X-Received: by 2002:a17:906:3088:: with SMTP id 8mr4253944ejv.499.1614357760574; Fri, 26 Feb 2021 08:42:40 -0800 (PST) MIME-Version: 1.0 References: <20210226021254.3980-1-shy828301@gmail.com> In-Reply-To: From: Yang Shi Date: Fri, 26 Feb 2021 08:42:29 -0800 Message-ID: Subject: Re: [PATCH] doc: memcontrol: add description for oom_kill To: Michal Hocko Cc: Johannes Weiner , Roman Gushchin , Shakeel Butt , Andrew Morton , Jonathan Corbet , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: 1ti47jkikrg9z65f1bh3p5d1mnh4faek X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: F13FAA0004CF Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=mail-ej1-f41.google.com; client-ip=209.85.218.41 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614357755-57491 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 25, 2021 at 11:30 PM Michal Hocko wrote: > > On Thu 25-02-21 18:12:54, Yang Shi wrote: > > When debugging an oom issue, I found the oom_kill counter of memcg is > > confusing. At the first glance without checking document, I thought it > > just counts for memcg oom, but it turns out it counts both global and > > memcg oom. > > Yes, this is the case indeed. The point of the counter was to count oom > victims from the memcg rather than matching that to the source of the > oom. Rememeber that this could have been a memcg oom up in the > hierarchy as well. Counting victims on the oom origin could be equally Yes, it is updated hierarchically on v2, but not on v1. I'm supposed this is because v1 may work in non-hierarchcal mode? If this is the only reason we may be able to remove this to get aligned with v2 since non-hierarchal mode is no longer supported. > confusing because in many cases there would be no victim counted for the > above mentioned memcg ooms. > > > The cgroup v2 documents it, but the description is missed for cgroup v1. > > > > Signed-off-by: Yang Shi > > Acked-by: Michal Hocko > > > --- > > Documentation/admin-guide/cgroup-v1/memory.rst | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation/admin-guide/cgroup-v1/memory.rst > > index 0936412e044e..44d5429636e2 100644 > > --- a/Documentation/admin-guide/cgroup-v1/memory.rst > > +++ b/Documentation/admin-guide/cgroup-v1/memory.rst > > @@ -851,6 +851,9 @@ At reading, current status of OOM is shown. > > (if 1, oom-killer is disabled) > > - under_oom 0 or 1 > > (if 1, the memory cgroup is under OOM, tasks may be stopped.) > > + - oom_kill integer counter > > + The number of processes belonging to this cgroup killed by any > > + kind of OOM killer. > > > > 11. Memory Pressure > > =================== > > -- > > 2.26.2 > > > > -- > Michal Hocko > SUSE Labs