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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 E02AEC433DB for ; Thu, 18 Feb 2021 12:39:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4D08D60230 for ; Thu, 18 Feb 2021 12:39:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D08D60230 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B123E6B0006; Thu, 18 Feb 2021 07:39:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC2146B006C; Thu, 18 Feb 2021 07:39:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B1226B006E; Thu, 18 Feb 2021 07:39:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id 81AE76B0006 for ; Thu, 18 Feb 2021 07:39:12 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4F9F1181AF5CC for ; Thu, 18 Feb 2021 12:39:12 +0000 (UTC) X-FDA: 77831343744.24.dog46_310fe3d27655 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 383ED1A4A0 for ; Thu, 18 Feb 2021 12:39:12 +0000 (UTC) X-HE-Tag: dog46_310fe3d27655 X-Filterd-Recvd-Size: 4528 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 18 Feb 2021 12:39:11 +0000 (UTC) Received: by mail-wr1-f45.google.com with SMTP id n4so2838838wrx.1 for ; Thu, 18 Feb 2021 04:39:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=b4Hk9Xkt4Q3LlvCihgo4WN89RwASW9sNa4+yXZPWHPw=; b=e2wBy1MEwC/GnkPUKP18oTIaZeV+3cuJQuXXon38Nat/uZM3dk0R0b47WOIe0tSJDk 5rqG7MssU6N82c00g4XY/bDJNn2rOyyoq2l7UaVohob9V0PgKH4ng+CoWaekt5KnzBXf 9vFYK65ZKg0hp8mEF4FBAv0A5XJy0Ga3q8wVA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=b4Hk9Xkt4Q3LlvCihgo4WN89RwASW9sNa4+yXZPWHPw=; b=Z3GTepR6IZhfH9v4m0kGAC1rhUVZpavGh95uTTqfjNPN2xEGRPJoSY5vSmOG0BSnX/ tllxGqla+7RxxCWxPZJ/AEcWBvWYUzoMdx5/KJ0LYgiIU0sMBQkiAeqHAJ4e5tINZcUm xzb978s2ZOF8Ry3Xp/jja8rJjJ0Ra1/5K8FsLABX9wfbIhIVjgV0DeYT+ZUn5aobLVSL NW8M5/rMSOn4bjfNYMf/pJTYhedbwKUf9SdCa6c5EC+VM4tfxpxmEQcU01Fmwt3K+Mgj Zg6VSXIF6IhQnvqElteWQbWtq4CpWu6mZW29SXbsd+0jLk9WTJShhFOCpSy04a3EydsS vjzA== X-Gm-Message-State: AOAM530S3cUfNGDNiwwwuaJVkKaiglVgcXxaH3XA+ggyGDATqT8rdsrH berzLOaV+AJx/8LJ756DHw+NHQ== X-Google-Smtp-Source: ABdhPJwUakPH1ZbGEB2SO4sHsjmVQffVAVDx0FvlBYPTCQdYSSxqg/qebMbkRC6RmykPuzbcG3Ur4g== X-Received: by 2002:adf:fb51:: with SMTP id c17mr4302952wrs.145.1613651950397; Thu, 18 Feb 2021 04:39:10 -0800 (PST) Received: from localhost ([2620:10d:c093:400::4:f7e9]) by smtp.gmail.com with ESMTPSA id z63sm7641374wme.8.2021.02.18.04.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 04:39:09 -0800 (PST) Date: Thu, 18 Feb 2021 12:39:09 +0000 From: Chris Down To: Eiichi Tsukata Cc: Michal Hocko , Mike Kravetz , "corbet@lwn.net" , "mcgrof@kernel.org" , "keescook@chromium.org" , "yzaikin@google.com" , "akpm@linux-foundation.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-fsdevel@vger.kernel.org" , Felipe Franciosi , "shakeelb@google.com" Subject: Re: [RFC PATCH] mm, oom: introduce vm.sacrifice_hugepage_on_oom Message-ID: References: <20210216030713.79101-1-eiichi.tsukata@nutanix.com> <99FF105C-1AAB-40F3-9C13-7BDA23AD89D9@nutanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <99FF105C-1AAB-40F3-9C13-7BDA23AD89D9@nutanix.com> User-Agent: Mutt/2.0.5 (da5e3282) (2021-01-21) 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: Eiichi Tsukata writes: >>> But that comes with a challenge: despite listening on cgroup for >>> pressure notifications (which happen from those runtime events we do >>> not control), >> >> We do also have global pressure (PSI) counters. Have you tried to look >> into those and try to back off even when the situation becomes critical? > >Yes. PSI counters help us to some extent. But we've found that in some cases >OOM can happen before we observe memory pressure if memory bloat occurred >rapidly. The proposed failsafe mechanism can cover even such a situation. >Also, as I mentioned in commit message, oom notifiers doesn't work if OOM >is triggered by memory allocation for kernel. Hmm, do you have free swap? Without it, we can trivially go from fine to OOM in a totally binary fashion. As long as there's some swap space available, there should be a clear period where pressure is rising prior to OOM.