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=-8.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 F02D6CA9ED0 for ; Sun, 3 Nov 2019 10:47:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B3FED21744 for ; Sun, 3 Nov 2019 10:47:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yandex-team.ru header.i=@yandex-team.ru header.b="lE13eQSa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3FED21744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yandex-team.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 666A16B0003; Sun, 3 Nov 2019 05:47:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 615D06B0006; Sun, 3 Nov 2019 05:47:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52C416B0007; Sun, 3 Nov 2019 05:47:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 38E5E6B0003 for ; Sun, 3 Nov 2019 05:47:06 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id C0CEE5832 for ; Sun, 3 Nov 2019 10:47:05 +0000 (UTC) X-FDA: 76114638810.05.range48_394e2c6e2906 X-HE-Tag: range48_394e2c6e2906 X-Filterd-Recvd-Size: 4725 Received: from forwardcorp1p.mail.yandex.net (forwardcorp1p.mail.yandex.net [77.88.29.217]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Sun, 3 Nov 2019 10:47:04 +0000 (UTC) Received: from mxbackcorp1j.mail.yandex.net (mxbackcorp1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::162]) by forwardcorp1p.mail.yandex.net (Yandex) with ESMTP id 5C90D2E12F1; Sun, 3 Nov 2019 13:47:02 +0300 (MSK) Received: from myt5-6212ef07a9ec.qloud-c.yandex.net (myt5-6212ef07a9ec.qloud-c.yandex.net [2a02:6b8:c12:3b2d:0:640:6212:ef07]) by mxbackcorp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KHJR1XQOJA-kwROc7Pv; Sun, 03 Nov 2019 13:47:01 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1572778021; bh=8XearGK11qBc8jFq4PW5InTouWf44DKhrpzFPg+Gueo=; h=In-Reply-To:Message-ID:From:Date:References:To:Subject:Cc; b=lE13eQSas0qHhNiasm2ObqKIkaStVX1Bl/Oof1cHomYycmF+AqaCUCFnFygtZe51t cs47xowN98FlJ3SPPgFC/g/p1NFvOdKgw++8jKGe4BbDJIljmDq/LYcsgndyL+Fww/ SUjmai6T44Gtsi621bYmFOKMqVXtvXoF5h9yVh7c= Authentication-Results: mxbackcorp1j.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from unknown (unknown [2a02:6b8:b080:7101::1:7]) by myt5-6212ef07a9ec.qloud-c.yandex.net (nwsmtp/Yandex) with ESMTPSA id Cpf51azSdT-kwV8oddc; Sun, 03 Nov 2019 13:46:58 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: [PATCH] mm/memcontrol: update documentation about invoking oom killer To: David Rientjes Cc: linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Michal Hocko References: <157270779336.1961.6528158720593572480.stgit@buzz> From: Konstantin Khlebnikov Message-ID: Date: Sun, 3 Nov 2019 13:46:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit 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 03/11/2019 02.55, David Rientjes wrote: > On Sat, 2 Nov 2019, Konstantin Khlebnikov wrote: > >> Since commit 29ef680ae7c2 ("memcg, oom: move out_of_memory back to the >> charge path") memcg invokes oom killer not only for user page-faults. >> This means 0-order allocation will either succeed or task get killed. >> >> Fixes: 8e675f7af507 ("mm/oom_kill: count global and memory cgroup oom kills") >> Signed-off-by: Konstantin Khlebnikov >> --- >> Documentation/admin-guide/cgroup-v2.rst | 9 +++++++-- >> 1 file changed, 7 insertions(+), 2 deletions(-) >> >> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst >> index 5361ebec3361..eb47815e137b 100644 >> --- a/Documentation/admin-guide/cgroup-v2.rst >> +++ b/Documentation/admin-guide/cgroup-v2.rst >> @@ -1219,8 +1219,13 @@ PAGE_SIZE multiple when read back. >> >> Failed allocation in its turn could be returned into >> userspace as -ENOMEM or silently ignored in cases like >> - disk readahead. For now OOM in memory cgroup kills >> - tasks iff shortage has happened inside page fault. >> + disk readahead. >> + >> + Before 4.19 OOM in memory cgroup killed tasks iff >> + shortage has happened inside page fault, random >> + syscall may fail with ENOMEM or EFAULT. Since 4.19 >> + failed memory cgroup allocation invokes oom killer and >> + keeps retrying until it succeeds. >> >> This event is not raised if the OOM killer is not >> considered as an option, e.g. for failed high-order > > The previous text is obviously incorrect for today's kernels, but I'm > curious if we should be conflating the documentation here by describing > the pre-4.19 behavior. OOM killing no longer happens only on page fault > so maybe better to document the exact behavior today and not attempt to > describe differences with previous versions? > Previous behaviour was here for ages and 4.19 is not so old. According too https://www.kernel.org/category/releases.html pre-4.19 will be maintained for couple years at least. Let's keep this tombstone. I've seen a lot of strange side effects of old behaviour. Most obscure was a hang inside libc fork() when clone(CLONE_CHILD_SETTID) silently fails to set child pid =) https://lore.kernel.org/lkml/20150206162301.18031.32251.stgit@buzz/