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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 E2025C433DB for ; Fri, 26 Feb 2021 07:30:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6613564EDB for ; Fri, 26 Feb 2021 07:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6613564EDB Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B51416B0072; Fri, 26 Feb 2021 02:30:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B015B6B0073; Fri, 26 Feb 2021 02:30:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9EFE48D0001; Fri, 26 Feb 2021 02:30:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 869BD6B0072 for ; Fri, 26 Feb 2021 02:30:25 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 46E16824556B for ; Fri, 26 Feb 2021 07:30:25 +0000 (UTC) X-FDA: 77859596010.15.2ED0EE8 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf28.hostedemail.com (Postfix) with ESMTP id BC20F2000382 for ; Fri, 26 Feb 2021 07:30:24 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1614324623; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/HXqAM02hgi7ybH8245YJw1MoO6x4InLvKQoF/F6t3Q=; b=HmiQf+eyhJgYGs+fZUOhQlZQxTht6Vo62QPSRWm+lz1V8L1hi+FxfQ5IJexO9L+M/nTKiP JbkalI6qrAWfD48UdLhV8T/eui+TOnzvKATapWnlxqlXK409Pxo04fMPfW9HUQcnM/yDkO 4C6NnFb2szdnoNaFben5RIyY+OiumPk= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 91F0EAAAE; Fri, 26 Feb 2021 07:30:23 +0000 (UTC) Date: Fri, 26 Feb 2021 08:30:22 +0100 From: Michal Hocko To: Yang Shi Cc: hannes@cmpxchg.org, guro@fb.com, shakeelb@google.com, akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] doc: memcontrol: add description for oom_kill Message-ID: References: <20210226021254.3980-1-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226021254.3980-1-shy828301@gmail.com> X-Stat-Signature: zmgtdra983u9fni6u6okbtqh8ypbywna X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: BC20F2000382 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614324624-811466 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 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 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