Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6294317pxb; Wed, 17 Feb 2021 00:06:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtO5aUu7TlymBPU4lOu9uNld0SRitZ/KhEg03BadiuySqJigGJP9eKEN/ME/7TbQE4vPBR X-Received: by 2002:a17:906:5855:: with SMTP id h21mr7578967ejs.552.1613549175125; Wed, 17 Feb 2021 00:06:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613549175; cv=none; d=google.com; s=arc-20160816; b=0EjT5t/p1Jv5nCBnpYCA4+psANDY7/SC7D5VMkhrnk7CbU9lY0G5S70NXfhA93zW0D nSSlcEFKAEXkbRZAvWlSBzqjgJ3YePHwGu5lQYngM2c5TsgxtdaSUXujAy73wa8UWCRE b5jftaPWUXujxy2f+UMwgTF7ohl/B2aW1CE0f4seHpBXdeVdwZNbl/QSUAv2HggKOL6B 8hL//2nD9CiMfk7kNPzt3uzd42G+mYb1eFXTMsMFbV33Q9f3nMPxfqCQ3mH9QMS5mKdT K12V9HWYaTotQvM2djNSQRVNWhcI20UiIAUxCNmYOw+f2VDtIZGNjZU0qtr7K+U0cljd WAgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gV9fZi9ZMQ+85uUDSdhfOUqQJXrOLRcNGETfioChCIo=; b=dHrwG4PXvFy2STYN9fduwuMeTkGwQLKVcfJ2BoppNciK7mLj3Zt5GU76p5C+1AV69B MyGsa7X2cdw0Oa4kd1lndX3KqNIlDcqBIMIWJXKdVEEE3wZNK+1Gb5mRIVS1TA5Q4rsz Qb0k9YL2uK9WDKzimuA/+F7GUZxr3GQ+BFaW3TZFQpZJQQ1ZOr6U7Fqx3081QvFvBJ4w AnDZ42hq01M9PxC1wdiPS/r4VdKxipl3StDIeo8IEVvmNKx3CEGf06TuyzfmvTGxFM5e vicbcaHohqGOgpAXuEeuN02cxIt7VYwlLxq3+vZD0aerbuKAmDchbk9IdkeiGAT/+Bdg TBDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=fGyy949E; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x5si947302ejv.626.2021.02.17.00.05.52; Wed, 17 Feb 2021 00:06:15 -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=@suse.com header.s=susede1 header.b=fGyy949E; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230426AbhBQHzr (ORCPT + 99 others); Wed, 17 Feb 2021 02:55:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:46792 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbhBQHzo (ORCPT ); Wed, 17 Feb 2021 02:55:44 -0500 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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