Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1012332pxb; Thu, 25 Feb 2021 23:33:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYxS3sZhIm9oOA0R9eQEeB0Igl2wnhQjgxkru1Y0vhOuFWjjB9zjZhkO5TUmIJfcQe4Upv X-Received: by 2002:a17:907:3fa6:: with SMTP id hr38mr1933242ejc.24.1614324834051; Thu, 25 Feb 2021 23:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614324834; cv=none; d=google.com; s=arc-20160816; b=b96CRahG8wZAbrlSBZE+k88tzeypUH6SDxGz9+SYrCO6lCghprqqtXqUbwqLs68bNi FV4Yz5qDG58YPD8xuR+/auP5A2r2KrKL5fRE9tzcvcbokaHr8iL8BF/O1f6Ha4ltiQXa 3CqwDTZF4zoZ7OJ3NUpMb/kRYT1Y14t4VTqLxFCgTMx8jp4DGE9K5qHqPrtXFdhS43QZ No+r9mObKFFSzf6FWaGCX0gpekFPX/tnJOoeJzRSKRGop8GFBUxQwkbpI/3sXgwOEwRD MA8QG9rY9MWt/Iy6oCuA+PgfPB4YLSeZI0Clt+0VMYdc5Kv989mejeE0Hgwuu1IIIBy/ rjaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/HXqAM02hgi7ybH8245YJw1MoO6x4InLvKQoF/F6t3Q=; b=iVlCTURrl6gaJffIb/va1titPZfhQAo+kWLrK/qRMAtbnS+hYK4sRaYQsI3lU6x+xG P8CPutTF3VK0aEplYV1SfTeIWSvvGAvX08aBnhJnVi1pwoAff9d1ZQ7rDrcpVv2sFPAW iBFmZTmZp5w7oTJ4eJEKFbsbjli8vK9Z8Uw91UCmmVGZdSyzT9Tnmm4kWWGXLsjPrQrB +ODC2RqI7t0+KhDSZmfL8/fwaztnroWgRLgNZcVaTgkGvpEag6cqU+elYcHwdhyqkoeE YjILxcMjZz4mc/wW+vaz/xQm6yaCEsdaVDrzTHZYcL4rMah8Ki7h3lGDSfhPZVlUe/zw 8eIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=HmiQf+ey; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m5si4926303ejk.585.2021.02.25.23.33.29; Thu, 25 Feb 2021 23:33:54 -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=@suse.com header.s=susede1 header.b=HmiQf+ey; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229989AbhBZHbL (ORCPT + 99 others); Fri, 26 Feb 2021 02:31:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:38170 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbhBZHbK (ORCPT ); Fri, 26 Feb 2021 02:31:10 -0500 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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