Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3200280pxb; Mon, 1 Mar 2021 04:19:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcyEdhigHsbNDDgvhbzRZevuolLV+pzZVGRtc0n/IalpTBlD1t8LD3deXzIWMPzlOp08Rf X-Received: by 2002:a05:6402:4312:: with SMTP id m18mr16067470edc.99.1614601188631; Mon, 01 Mar 2021 04:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614601188; cv=none; d=google.com; s=arc-20160816; b=UNOQ1NJRdFLIB5xJp1aiODI56hSJspHJOvVF1Q1pw3YVOH2TMZdA1cMfnCTnFfYE63 NoIWmdwbaC17CNDa5vh2intCHL5al3OaySSgkqMSSBVcXg3lOIWMGxVB2uP/IZ1FAGV/ ej8s+Op/5Br4qgIj1KEHP9+Hga7lJ3C1MZlSAzsBF1sjV6ffk5W31ppl5k6YxIqyd9IK ft49LVwSDkvG/mQunRFXNk/cdqw4sDNO0gFro4XTNQ5oSMk8LS1e+e/TU+mPRlU5gCit yskse9zQ5dVNb04ryK7xN2ac4xV+lR+1pZz6h4CPSnLd293rUP1ti7TuSMstzR0xqA57 QEWg== 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=KsLZ5Y4Ek3DADqn5FApSaLdnl0AlNSLh5qu8paQS2MA=; b=NtAMIgvA5LkAt2vuXRjGzaLm+yId0We5rq2ELaBtr7F9Z34UttFPPrI0j32iyF3GiH r0cwZv5R6T4vc2OuqwtUL6kWrbR+lLqwA01YmHd/zoZagIvAB1p1h4zLVW+Q6V0c4ZVZ xkZXbUuI0En4xJbA3o1QOi2JRbsU+zwoGQQqDGyfRyaFCuO+BZ6tfc0WrvIdty/pJJJF tWQsCeSSHfawuqfIMKnPpnRSDGm0Ya+QKQzYmkH/LrxeM9ldWyjUapyfrFPB6stdar2z kpbaexVzq0hE6vbK4t9pr2kDgOcxqTz04l9nq0b9U4TVsWKHFXRutUDje4nJtL/GYMq2 ihYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=h51r4GoW; 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 x21si6371028eju.471.2021.03.01.04.19.26; Mon, 01 Mar 2021 04:19:48 -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=h51r4GoW; 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 S233460AbhCAMPu (ORCPT + 99 others); Mon, 1 Mar 2021 07:15:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:40020 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232836AbhCAMPt (ORCPT ); Mon, 1 Mar 2021 07:15:49 -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=1614600903; 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=KsLZ5Y4Ek3DADqn5FApSaLdnl0AlNSLh5qu8paQS2MA=; b=h51r4GoWiVVRKIf3kAFyA2IuXEPrk/XF/HNpzik1F6Zr3+5QYBzL5XY5rKVapq8i4wk3eb A9sEJX6VS1HLEnqxhXYzDIWFgafBF170CMwAXOHUPITdULmCIw6QM8isThOY/K7qkqhR4h 9XpzD5LMZMqJwGnvcnZhtusom/LyST8= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3FB38AC24; Mon, 1 Mar 2021 12:15:03 +0000 (UTC) Date: Mon, 1 Mar 2021 13:15:02 +0100 From: Michal Hocko To: Yang Shi Cc: Johannes Weiner , Roman Gushchin , Shakeel Butt , Andrew Morton , Jonathan Corbet , Linux MM , Linux Kernel Mailing List 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 26-02-21 08:42:29, Yang Shi wrote: > 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. I believe the reson is that v1 can have tasks in the intermediate (non-leaf) memcgs. So you wouldn't have a way to tell whether the oom kill has happened in such a memcg or somewhere down the hierarchy. -- Michal Hocko SUSE Labs