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 2FC39C433E6 for ; Wed, 17 Feb 2021 12:41:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7C9464E4A for ; Wed, 17 Feb 2021 12:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232675AbhBQMlf (ORCPT ); Wed, 17 Feb 2021 07:41:35 -0500 Received: from mx2.suse.de ([195.135.220.15]:39216 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232090AbhBQMl3 (ORCPT ); Wed, 17 Feb 2021 07:41:29 -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=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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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