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=-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 E824DC433DB for ; Wed, 17 Feb 2021 12:40:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9248E64E45 for ; Wed, 17 Feb 2021 12:40:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9248E64E45 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 ED2A98D0036; Wed, 17 Feb 2021 07:40:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EA9648D0019; Wed, 17 Feb 2021 07:40:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC0498D0036; Wed, 17 Feb 2021 07:40:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id C4E018D0019 for ; Wed, 17 Feb 2021 07:40:44 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 91AA35824 for ; Wed, 17 Feb 2021 12:40:44 +0000 (UTC) X-FDA: 77827718808.20.clam99_281470e2764c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 7193C180C0F68 for ; Wed, 17 Feb 2021 12:40:44 +0000 (UTC) X-HE-Tag: clam99_281470e2764c X-Filterd-Recvd-Size: 3264 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Wed, 17 Feb 2021 12:40:43 +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=1613565642; 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=eFaD6cMmUflfe3zZL8l/1NnW+074aRMBx7mpt03K63o=; b=T3NWYvman7n71RhYgVvyPrPRDNUhUpUESPEg1c+s/N1CuBVc0QBEPJW6rIvcSjTwOhyXpy 2VYCtSP/dZG7z5I2jh4WrO+TJ1rMZMu1jvL/jpMXu5XDO7F/zKwaNNaRDv3ee++RcExMS/ /4Q7qPxK6uEgQ7X9LGLMF8fTy9ce8F8= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B2025AF26; Wed, 17 Feb 2021 12:40:42 +0000 (UTC) Date: Wed, 17 Feb 2021 13:40:36 +0100 From: Michal Hocko To: Eiichi Tsukata Cc: 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 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-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 Wed 17-02-21 13:31:07, Michal Hocko wrote: [...] > Thanks for your usecase description. It helped me to understand what you > are doing and how this can be really useful for your particular setup. > This is really a very specific situation from my POV. I am not yet sure > this is generic enough to warrant for a yet another tunable. One thing > you can do [1] is to > hook into oom notifiers interface (register_oom_notifier) and release > pages from the callback. Forgot to mention that this would be done from a kernel module. > Why is that batter than a global tunable? > For one thing you can make the implementation tailored to your specific > usecase. As the review feedback has shown this would be more tricky to > be done in a general case. Unlike a generic solution it would allow you > to coordinate with your userspace if you need. Would something like that > work for you? > > --- > [1] and I have to say I hate myself for suggesting that because I was > really hoping this interface would go away. But the reality disagrees so > I gave up on that goal... > -- > Michal Hocko > SUSE Labs -- Michal Hocko SUSE Labs