From patchwork Mon Dec 13 16:25:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Schatzberg X-Patchwork-Id: 12674211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56D71C433F5 for ; Mon, 13 Dec 2021 16:26:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA8BE6B0072; Mon, 13 Dec 2021 11:26:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C30FC6B0073; Mon, 13 Dec 2021 11:26:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAA8B6B0074; Mon, 13 Dec 2021 11:26:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 960496B0072 for ; Mon, 13 Dec 2021 11:26:04 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 563EF88CFF for ; Mon, 13 Dec 2021 16:25:54 +0000 (UTC) X-FDA: 78913297428.15.45BEBD9 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by imf16.hostedemail.com (Postfix) with ESMTP id 64630180007 for ; Mon, 13 Dec 2021 16:25:53 +0000 (UTC) Received: by mail-qv1-f43.google.com with SMTP id gu12so14842305qvb.6 for ; Mon, 13 Dec 2021 08:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Nu0e3REkbFkXwUCLY/t28Mz7Y046BFRzaKZrlwttw5A=; b=AfF1bilD8S8n3fyC8TdgEVD0nCb7TFtTyXL6lV8hjUsZ43EkGsaTXH7JrcGFrJkKad Pr2F3aZ53Yy/fyREFZeLULo93p539ZBfTtBZjVqZ1KeD3hDw1e6tPh1RNnrPJdQ9rfAZ 4eOT9ab3ciHjBYtgmCBOLE4ed8/N7ROJsj8Ie9VazehcR+BLwFGsmxQ1anpdx/4KuYcm IdSWnsHSGBgRuNtedTLPapppi4nGCMmz2U6RFYFbitW+LXWCSvvalTKzfRxpBi5BMbnZ rXxBOzMs0F6BVaxF29XfcggrKFOPc0TptUvhh+TjJo1Qz5rqFYhzM6GRQyQBGAUeI9un 1QGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Nu0e3REkbFkXwUCLY/t28Mz7Y046BFRzaKZrlwttw5A=; b=DVQwavMe3QV7dYP1gqQHMvFSHVJL5XzHH7xU3VHdDNNEiFvsWHGssy9xnhIE3Fx9pC MqdVgEdfhTctoWrce7kxZdD1LCIObo02bweqIa3MBv7nXQjSDT4sSVdJbQaWb8mE7mvb uByD/7aSpnLSMCEAKh0sl1VZwN5QKTKqyDaYXFn4C+rSly2drtnm/C+dMNdgqWVr4wT/ UfXDJy1ggQzkXcZnr+2caN1KGjtoDbvvj20Jp2WsUBpu92bWK1Z5oSwRtVOtUkwn9KGw nvVapIRNn3jagx5oxtSWLwUKG307LdHU0mX0LaHEv1anQZh0/xMxzGFkZfmhIOzqouB7 W8FA== X-Gm-Message-State: AOAM531G0AAZpCMCoSQAmqny0U/WyjqYg/8ga2chdbfhAPmYOlXVVCKK LMb6TbyxIwwZwJbnoNRnLiA= X-Google-Smtp-Source: ABdhPJxGAgKYzBWVUtbmLXtj3Lh4MxUnmxMXzwDBqvwT/sapc4nAy4QeBUtdOyseR2y2m1las0eFyg== X-Received: by 2002:a0c:f34d:: with SMTP id e13mr44354703qvm.119.1639412752642; Mon, 13 Dec 2021 08:25:52 -0800 (PST) Received: from localhost ([2620:10d:c091:500::3:42c0]) by smtp.gmail.com with ESMTPSA id l22sm9262859qtj.68.2021.12.13.08.25.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 08:25:52 -0800 (PST) From: Dan Schatzberg To: Andrew Morton Cc: Roman Gushchin , Chris Down , Johannes Weiner , Tejun Heo , Zefan Li , Jonathan Corbet , Michal Hocko , Vladimir Davydov , cgroups@vger.kernel.org (open list:CONTROL GROUP (CGROUP)), linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list), linux-mm@kvack.org (open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)) Subject: [PATCH] mm: add group_oom_kill memory.event fix Date: Mon, 13 Dec 2021 08:25:10 -0800 Message-Id: <20211213162511.2492267-1-schatzberg.dan@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Stat-Signature: et6oxqo3udkh163eej37jmdojwnksz5s Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AfF1bilD; spf=pass (imf16.hostedemail.com: domain of schatzberg.dan@gmail.com designates 209.85.219.43 as permitted sender) smtp.mailfrom=schatzberg.dan@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 64630180007 X-HE-Tag: 1639412753-214370 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: Andrew, could you please amend the prior patch "mm: add group_oom_kill memory.event" with these changes from Johannes and Chris? Also - small nit: it makes better sense to s/group_oom_kill/oom_group_kill/g in the patch title. Reviewed-by: Roman Gushchin Acked-by: Chris Down Acked-by: Johannes Weiner Signed-off-by: Dan Schatzberg Acked-by: Michal Hocko --- Documentation/admin-guide/cgroup-v2.rst | 3 +-- mm/memcontrol.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index eec830ce2068..8269bfa240f4 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1269,8 +1269,7 @@ PAGE_SIZE multiple when read back. killed by any kind of OOM killer. oom_group_kill - The number of times all tasks in the cgroup were killed - due to memory.oom.group. + The number of times a group OOM has occurred. memory.events.local Similar to memory.events but the fields in the file are local diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 5ab3b9ce90de..b5454d8fc344 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4390,9 +4390,6 @@ static int mem_cgroup_oom_control_read(struct seq_file *sf, void *v) seq_printf(sf, "under_oom %d\n", (bool)memcg->under_oom); seq_printf(sf, "oom_kill %lu\n", atomic_long_read(&memcg->memory_events[MEMCG_OOM_KILL])); - seq_printf(sf, "oom_group_kill %lu\n", - atomic_long_read( - &memcg->memory_events[MEMCG_OOM_GROUP_KILL])); return 0; }