Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7302983pxb; Thu, 18 Feb 2021 06:46:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfpvuQMEjyEEEYAJvqgesqvdmam0B//amwYWqm4eML8NzAjU2yKHaBWUxWq4sIiL0Y7aVB X-Received: by 2002:a05:6402:605:: with SMTP id n5mr4453806edv.128.1613659614984; Thu, 18 Feb 2021 06:46:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613659614; cv=none; d=google.com; s=arc-20160816; b=ML4GtGijiaoKUaDjpdZ+fbW9XY9Wqyeq79qfYsa61wuOk4vy8t7+UVKM2/sm+6m6XP zvUEbZ/wQQx3jZWzmbqNhRr1msKC/7UOktSXjfI+WCNtMyZ5eL8kCOW/yiY2x/z+pXch DMVhD/2aBp6u4UqGZ2yiE9wLLm6VYrEWp+Z6g4tPhIRZnhvQdv8YbrjV+VrLySBmwgba Qyfo916mep/+GSdI4sUf7d+l4Huu3aYQ4A7ejIIwXcWBc2bQoVSdV5UQ6OSi9bG/FCmc spON1DWWVWFPwue52/KbLL5PRWrmfMFvFofRrfNOyLDNf6v5RYc8SXeel9j7ERv0X7h4 VaEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=b4Hk9Xkt4Q3LlvCihgo4WN89RwASW9sNa4+yXZPWHPw=; b=BhdkzQIdDev30Cpl/yUJ3rpc2+sp5Vm/zuUv99z4QKOWD6cnPWyhfYfddr722Qpcv3 1YrhuASwfSOQQAVe7bGtol2N+61oIQ+Kp6YA1UKcDxCLxGFqpPkfVtZO1W2iTsKNhIbO 7KTVAqxAVWuq+IfNPzVyuFCPmOnzb9G3El6sMu5vPKHDS9MogLXEpYEIra9QHBHYurBx j6MhYmf28a9aLxtS9n2FcQ/ieL/UjDON3PNn15SHbPGcJnqImMITGIo4MOIvb6koKPQi idYaxa3zqv1u6aNffg+8kExAoH9sWtZkBizye82+PjvZV75YcjlpwQSwMrmSa77UYlih jSqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=e2wBy1ME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si562109edr.284.2021.02.18.06.46.29; Thu, 18 Feb 2021 06:46:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=e2wBy1ME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232063AbhBROne (ORCPT + 99 others); Thu, 18 Feb 2021 09:43:34 -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-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.