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.5 required=3.0 tests=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 1BBA3C47E49 for ; Tue, 5 Nov 2019 06:10:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C0A2E217F4 for ; Tue, 5 Nov 2019 06:10:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0A2E217F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2E71D6B0003; Tue, 5 Nov 2019 01:10:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 297AB6B0006; Tue, 5 Nov 2019 01:10:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1AD846B0007; Tue, 5 Nov 2019 01:10:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id 03BF06B0003 for ; Tue, 5 Nov 2019 01:10:02 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 7E7E43D13 for ; Tue, 5 Nov 2019 06:10:02 +0000 (UTC) X-FDA: 76121198244.12.dust36_1d6b395d4d531 X-HE-Tag: dust36_1d6b395d4d531 X-Filterd-Recvd-Size: 2861 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Nov 2019 06:10:02 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 75FB4B160; Tue, 5 Nov 2019 06:10:00 +0000 (UTC) Date: Tue, 5 Nov 2019 07:09:59 +0100 From: Michal Hocko To: Konstantin Khlebnikov Cc: linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH] mm/memcontrol: update documentation about invoking oom killer Message-ID: <20191105060959.GA22672@dhcp22.suse.cz> References: <157270779336.1961.6528158720593572480.stgit@buzz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <157270779336.1961.6528158720593572480.stgit@buzz> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Sat 02-11-19 18:16:33, 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") Is this really appropriate? 8e675f7af507 was correct at the time. It was 29ef680ae7c2 that hasn't updated the documentation. I would just drop the Fixes tag. > 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 I would go with Kernels between 3.12 and 4.19 invoked the oom killer only if shortage has happened inside page fault. > + 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 -- Michal Hocko SUSE Labs