Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1356443pxb; Fri, 26 Feb 2021 08:45:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDPqbMyJPT5jiGx5vAY0cZ3I9ItZn108aG9iC/C5eiq3E0STCMa+AllRi45WxLKNR6QINA X-Received: by 2002:a05:6402:438e:: with SMTP id o14mr4308936edc.215.1614357903283; Fri, 26 Feb 2021 08:45:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614357903; cv=none; d=google.com; s=arc-20160816; b=tv1hxAyICFxN2C2slYx7r5TFG2lcfXwYlICcS7fX/0ol5Tt+sy1OvqilP1eipkiC/5 p9FSF/z0XqjBzwZyJETUyJriyxKfqJDlWeVD2ZAQ4KSTU3z3ajGog3xXrU5FRElLCeMO KWVTyzDGmxihWvt34ILnsdYeOxtc3kETrn20uE3Ge1zzBtcE3O8GZ3YqA1K5cQiHSl7r 7mlOWBwMKegTjgiAhFt6ljKuvQk1j5cSp7F3mRbv3PrHUnID2EmEflUBHSt+XSNKSYR+ OxdqL9F0bnC3KDTibKwVM3/811fS8OYZOWq5YWSkQZNppAnp5eKrGa0S28xTFJXYyWCk N1pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oJEVlbPPvFAyDZRVvcO+54tdbNeS7EYd7BewxLTv368=; b=IOeetBb50croWdet1axhildeHJ8z81KSRjPtnc5/3vbfbEyst5yC3DFtz7ROuzMeR5 WVJJQINFz9IpYWptKx4ymE7dil4BC9SM9xu2Hogi1IJk3nlJADTG7I+1g5klOikgKIQ5 1Y9mR12UVcrDNHT0ezN6XqZ0fGqBlHR7HTOex83jtxOusuWDOf+4l4Rtb/0cwcL6HhZV yGNZ6KhSENeCnBs0LpfGC4IhjfdCvPIhg8tPy6PqCR3Q3a1EPeNKBPqbZSo4qPDgYozQ yzNbEIH17weF0IBtKFhthzTcTTzO9sfogtrX7gTkE9bfDfZ14H89rgB6KuiyRQoJ4mei U0hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qZAoRzlN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si5948557edo.152.2021.02.26.08.44.39; Fri, 26 Feb 2021 08:45:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qZAoRzlN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbhBZQn1 (ORCPT + 99 others); Fri, 26 Feb 2021 11:43:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbhBZQnX (ORCPT ); Fri, 26 Feb 2021 11:43:23 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34D8C061574 for ; Fri, 26 Feb 2021 08:42:41 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id mm21so15620937ejb.12 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=gQX9ZPQs0IGoNJtcfu7MO/wrewCGT77jtIXhcxok6U5htZ3zovAa86nb17x8EDJcZS AegodFB35Jb5HpDYJLAWK9B8Pv7gzeQP6xJz+yO9zAlodWx69Z7KotfSaAYn9yxy2KGN 8M9LSX3VMS0Y+OXoJOvVkwt26qx+EV5/St6hXFz/s+B1uO1XgqB6aiHwZpgwl0jRwY1e XDZUjoRQK9Mgfw2Bk3xXKGPCWpJMRKgugMNyWJE7W/DJT/TQ58FCdR8vVPneF6rh4W5o qK/HX2xehnTm1itUlpd82olQKL9VNbVjDx7ihgZMoCg3vBdVenT/2tLw1UXj+xrcpT61 BYNA== X-Gm-Message-State: AOAM530eefClss8ENAywSwMBnuUG2+vVl2F7DW3KndSRp662dBCCSvZ8 BO5AH/qtHyzF9qOI85myNNu3KKLuS1Utf61uBqc= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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