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 F3731C433DB for ; Thu, 18 Feb 2021 14:45:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77B3964E3E for ; Thu, 18 Feb 2021 14:45:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231162AbhBROoU (ORCPT ); Thu, 18 Feb 2021 09:44:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233144AbhBRMjz (ORCPT ); Thu, 18 Feb 2021 07:39:55 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB190C0613D6 for ; Thu, 18 Feb 2021 04:39:11 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id f7so1653450wrt.12 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=jRos4hBlWqgHwI6bhl+RuocuStzqwkOfg72HQaW65vC6ERqizfzn0nHGetz8qRkext R/0UU1JEZHm/RGp6u0uoBYT9iCK6DHG1Nxr0DtYWy/c75sz87bzLjZJBvfkmZkUcsUhW OpL5KenTfmyXKZbK5KN+/pchxKY7PJswFwyNuFkqLdoNx7Sk55L44XJvbhmtM+kDTBYq CNIXFdvLoXfSfK/HB5Cvab1yIbOIEs13hc476L2WxX37rzS3CfTBbZhylYXuFUZnJW/O /YOv7qTEJREMXALFdkKJ3l1p8dFucSo1PLcnJSop8itgiM4NwTf8Uusl/JZMl50bpcgN Y8VQ== X-Gm-Message-State: AOAM531K3tD4CRjXHc6+TZuvIrDBmzf+oXuH11F0EWOZQwN7E9JPl97Q GHyStaaP3IUA98t0C5fExkjdkA== 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.