Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp394660pxb; Wed, 3 Mar 2021 06:07:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9WxsE3NCmD4yUbi/UkCxKj841Wgen4jAKM+R/LLaYXK6+jRudfCfDr6iEqsBjbI9NJYi2 X-Received: by 2002:a2e:809a:: with SMTP id i26mr14853944ljg.357.1614780428318; Wed, 03 Mar 2021 06:07:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614780428; cv=none; d=google.com; s=arc-20160816; b=Hacv22YEw/NGl6hS7cgPjNi6FHFlqRrkGRz1j0yCVyu/kQ9x2orvAPWOToJ8cujwbp sH+VylXnp6zYwAjQHxxWPp73RfHPEw+6cZiJzfdMUTRC51Y8eW+RhGnWIoAqBWJg+kcp FPdQ+ePe/0ceLxg7k0AOB32oW+A2CKwcNtr+riL8a0JpPft8TqIA+U2DTENTSAIX2Qzi V73rN6lVrMGTD/bURSa209+2EcZrpIaubT/sQ8eShFpXTb8ZZMpMOQwuaEcBlL0plA9L aiv4PWt8GB3bQVYRFxAZwIx22w+zvU57f4I9VMtDU3LEwdqUyNRWUZ15nxrI126AP2C1 iu0g== 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=IxFWs0oSU3V/NwnpfCvBJ5DgtOSVkYwO/FOfviidy1k=; b=WBXSz9zxw++guh+JlPbaM8G86W4AjNu7n9gkrhRUGgO5RbqkjAlP7iDHyaLfPzsZbr gXR4AWebT/y/D1u8L9sm/7hXOc/HDvJA+K1Tykdli1N6NcIUQRmjrF8mJ8eP2Yje41rb b6PcwWooV98eWQcE7/mr5vPsXnrx+faVvB1upmRL2U8cYVjGYss/U61ies4VxEAe1O/n rCIXaVIfk0YkucBvgeE6bgjCXo1s1ujHbUg6isHDTZyxZXhCzBc+8F8/TiqVpihLjoHx REIXP87P6kbGfiiFzNs45n0oGi8AP0sbZrLcUFhqeqBBHWAKjPXdc7bbIcptLgW1X8WH ahyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=txCf4l4p; 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 df24si11853973edb.407.2021.03.03.06.06.23; Wed, 03 Mar 2021 06:07:08 -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=txCf4l4p; 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 S243573AbhCAUdg (ORCPT + 99 others); Mon, 1 Mar 2021 15:33:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237215AbhCARH6 (ORCPT ); Mon, 1 Mar 2021 12:07:58 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45F9BC061756 for ; Mon, 1 Mar 2021 09:07:17 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id jt13so29615408ejb.0 for ; Mon, 01 Mar 2021 09:07:17 -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=IxFWs0oSU3V/NwnpfCvBJ5DgtOSVkYwO/FOfviidy1k=; b=txCf4l4pnUYHnMMbaJ+nwcAmrJ5ZF3Esp9SrwyXS8fquZcYAjnVSuLO5lqp2yhPo7t Fb2XxDHLr1OOoKy2dU6xNfvpb3FJZg3g+h5R4NHmkbqjpT3+jke2SORlpIISKFF89bld aHlGlQqv4jd3L7V8+5PiwCZNL+6ENSAsrI1C6DDqO/O5CLEKFNgYyEeFMpn0tiUdUt75 IK2vBaChZcFbexfDJ2jLW1yDvgY4IdG2Ezb7pPzNkTprW+PabRns1J+fEuElHuDijrW/ 9TpomORJI745VH06++izgLQa+/AqeHCQOdOIjU1pOBrl9trrPGFQ28egcJs+ltmQPbq2 5QeQ== 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=IxFWs0oSU3V/NwnpfCvBJ5DgtOSVkYwO/FOfviidy1k=; b=lzkbX7SS5FM+9OH+Jr/rXsNfBuRixU83GT3GsBs6LB/Gc7B6lu3jet4iDTcOrDnYGH tZD+co5rMqxu89yBh19Ztudwecp9tOHuqHM7L8dh9Set1NWL7SKvTabZ62+O5aqaW/Ll QtafKA3CQ0a8p4dJs9Alm4bWEwjLZ+KwRVXCN4NP+6S2YHK5b7mzioJEmxw0AF411VRc YDpcJgsnom+7giMrjwjpc22DjBl1RadxU2IumNn2dceVlTTKLIB205DcPChvkljSXm46 hJYTNU+8B+FgE/7yX+ZCn1zzyqD5gbYcgh/VbB4ysLVcNWyeTZv5F3BAEgPoACix/M3Z gtvA== X-Gm-Message-State: AOAM531shmbjNxkwuVHKllOFiVIZI1DuQ2UKQDrcduBxfdgxMwKRC3PN 69wJG0waCuhPFrbAwO6+rHnzOEgL3x7aPu9Kfzw= X-Received: by 2002:a17:907:2bf6:: with SMTP id gv54mr17291479ejc.514.1614618435996; Mon, 01 Mar 2021 09:07:15 -0800 (PST) MIME-Version: 1.0 References: <20210226021254.3980-1-shy828301@gmail.com> In-Reply-To: From: Yang Shi Date: Mon, 1 Mar 2021 09:07:03 -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 Mon, Mar 1, 2021 at 4:15 AM Michal Hocko wrote: > > 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. Aha, I forgot it, that's bad. Although we don't have tasks in intermediate nodes in practice, I do understand it is not forbidden as cgroup v2. > -- > Michal Hocko > SUSE Labs