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=-5.8 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 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 E8457C433E0 for ; Wed, 17 Feb 2021 07:55:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3AFA164E4A for ; Wed, 17 Feb 2021 07:55:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AFA164E4A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 89B408D0026; Wed, 17 Feb 2021 02:54:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 824998D0019; Wed, 17 Feb 2021 02:54:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6C5538D0026; Wed, 17 Feb 2021 02:54:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id 531568D0019 for ; Wed, 17 Feb 2021 02:54:59 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1C8011DF7 for ; Wed, 17 Feb 2021 07:54:59 +0000 (UTC) X-FDA: 77826998718.10.FEC15E2 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf09.hostedemail.com (Postfix) with ESMTP id C2C3B6002496 for ; Wed, 17 Feb 2021 07:54:55 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613548497; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gV9fZi9ZMQ+85uUDSdhfOUqQJXrOLRcNGETfioChCIo=; b=fGyy949Ey1/r5PfLdWvT48bbwagETLGHHIof00DMOaYAhUEMwJv1QqqV1rvjgU4ZUZmblV UgA2dJVd1ZoiOnSYhb2q8XXUqeLsTbZTlq6cVMc8q+PIzFdT48yr8sZQwcLx459lfWBV7f 31IbdgWOdajHXR4L8jJmQrKUZfz3OEc= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E9544AF45; Wed, 17 Feb 2021 07:54:56 +0000 (UTC) Date: Wed, 17 Feb 2021 08:54:55 +0100 From: Michal Hocko To: David Rientjes Cc: Eiichi Tsukata , corbet@lwn.net, mike.kravetz@oracle.com, 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@nutanix.com Subject: Re: [RFC PATCH] mm, oom: introduce vm.sacrifice_hugepage_on_oom Message-ID: References: <20210216030713.79101-1-eiichi.tsukata@nutanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: h5txjm463te4s5jgezc98o6bsdgs6eob X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: C2C3B6002496 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613548495-327741 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 Tue 16-02-21 13:53:12, David Rientjes wrote: > On Tue, 16 Feb 2021, Michal Hocko wrote: [...] > > Overall, I am not really happy about this feature even when above is > > fixed, but let's hear more the actual problem first. > > Shouldn't this behavior be possible as an oomd plugin instead, perhaps > triggered by psi? I'm not sure if oomd is intended only to kill something > (oomkilld? lol) or if it can be made to do sysadmin level behavior, such > as shrinking the hugetlb pool, to solve the oom condition. It should be under control of an admin who knows what the pool is preallocated for and whether a decrease (e.g. a temporal one) is tolerable. > If so, it seems like we want to do this at the absolute last minute. In > other words, reclaim has failed to free memory by other means so we would > like to shrink the hugetlb pool. (It's the reason why it's implemented as > a predecessor to oom as opposed to part of reclaim in general.) > > Do we have the ability to suppress the oom killer until oomd has a chance > to react in this scenario? We don't and I do not think we want to bind the kernel oom behavior to any userspace process. We have extensively discussed things like this in the past IIRC. -- Michal Hocko SUSE Labs