Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1316212imc; Mon, 11 Mar 2019 11:00:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiBCiAAboZx5WaGkwy5wTtD536VupoaMLkVr/zuM/CENSsaCZ4V7c7MP8ux4GQeCgzUcP+ X-Received: by 2002:a17:902:9894:: with SMTP id s20mr35101915plp.135.1552327207576; Mon, 11 Mar 2019 11:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552327207; cv=none; d=google.com; s=arc-20160816; b=NnayI2ZzYkPEI68v89TjlDqf5sqUiGAnmiQHx3vlKHOwTsWSXvvA4grRFfwwO2ZZgf Akf4qugJaho+B4KFWYPupndP5QZstdV3Uw3GmEhLGFxxtIf22Fl06ab67ivuHRhxKwe7 2LfLEVuvPrAw4KBMVc+YjzZBm0E2zuo7y0lzRt6fJAIhhDp1HPfoxkCqvl5JV/iThO/f jDU6Hh7DBGJx6Gbm0Py6xo/ErcQCIUuhhm5fSkaVcvN5cHfWaDlAz6KewXeQAst5VXR+ xCZsdAwejuiRrEK0J/7/8LhHRDCycWbHt68i+pPjezj3g/AXaD7RW4F0edxm/91za8v4 i1kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aOZ8uHt6bncKFLR0pCiPe6i6BuhLZtI6G9d8bKnXFfo=; b=W8Mcez2xL13a+YoPMZr2tGQ9iF63yyiOiDSF31VIDggIQ8v4/y0f8QUYtNa/oHoUBx HKswwRIFPQUcMMgkny94SFyXaCqUKP1EkL5j3zzXLe15bqPybbu7ow6PIJ2L5pA4Cppu VGP+6GLGBErN5qgTMkILxrv9IYfm3CzO+GPwTn9+pVfEk4DD2rXFT2G+1oE255P4CihY wLs2KSeFrUMjOJUlGJ6fNWuwZcmBQkNPp7bKcbdUlnp9NTpYJiaDRbBraqVObRcE/hHD VRapzr97L08vOR7dYexyswRZoR9mPQPYCqqm4tuKxszmsaZzf9xLcyChdytmwYIpH6ky MeQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k74si5725651pfb.32.2019.03.11.10.59.51; Mon, 11 Mar 2019 11:00:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbfCKR6G (ORCPT + 99 others); Mon, 11 Mar 2019 13:58:06 -0400 Received: from mail-ot1-f46.google.com ([209.85.210.46]:37372 "EHLO mail-ot1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727147AbfCKR6G (ORCPT ); Mon, 11 Mar 2019 13:58:06 -0400 Received: by mail-ot1-f46.google.com with SMTP id b3so4779732otp.4 for ; Mon, 11 Mar 2019 10:58:05 -0700 (PDT) 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=aOZ8uHt6bncKFLR0pCiPe6i6BuhLZtI6G9d8bKnXFfo=; b=rClGJy72QIbINWJxMoaRDemUoIbiAU3GyHXs9KmNM0PHB33ZhyhMbU7ljQ+MmD+lac staKrrQ8RuFOWJ6X271LWgFdFO0cUCWLgDcitX6JFmx/Z4HCtrSLhtaNvpZe40Pmp8BP Ew/vUqFYuUUnVknNSTsNCEYeLFMxfTarZoybc0ImhjkrDuFF+IpOHfYbw9vGMh9yJSRq fMBPrKRAkTmIQF/nzW6NHDVTXOjrM2hiqbA1Zd0ACkWRj4/5hp80+1MvvvzmkSiGqiWT X/kct+O61MsDvmd2Ci2JZYcgKoUGUa9wrP99w3w8BDqLtLl9EqSzhz78mMr5cK8ti3C7 9Mjg== X-Gm-Message-State: APjAAAUm+zZt0vqef7JPEMcBwAdCEA5XYpm/WNQkqFGXc5GUrXSDm0/m mfjgOYsGU0Tb3h09AXKdO0o= X-Received: by 2002:a9d:7841:: with SMTP id c1mr21854509otm.354.1552327085287; Mon, 11 Mar 2019 10:58:05 -0700 (PDT) Received: from sultan-box.localdomain ([107.193.118.89]) by smtp.gmail.com with ESMTPSA id r9sm2522935otp.81.2019.03.11.10.58.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Mar 2019 10:58:04 -0700 (PDT) Date: Mon, 11 Mar 2019 10:58:00 -0700 From: Sultan Alsawaf To: Michal Hocko Cc: Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-mm@kvack.org, Suren Baghdasaryan , Tim Murray Subject: Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android Message-ID: <20190311175800.GA5522@sultan-box.localdomain> References: <20190310203403.27915-1-sultan@kerneltoast.com> <20190311174320.GC5721@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190311174320.GC5721@dhcp22.suse.cz> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 11, 2019 at 06:43:20PM +0100, Michal Hocko wrote: > I am sorry but we are not going to maintain two different OOM > implementations in the kernel. From a quick look the implementation is > quite a hack which is not really suitable for anything but a very > specific usecase. E.g. reusing a freed page for a waiting allocation > sounds like an interesting idea but it doesn't really work for many > reasons. E.g. any NUMA affinity is broken, zone protection doesn't work > either. Not to mention how the code hooks into the allocator hot paths. > This is simply no no. > > Last but not least people have worked really hard to provide means (PSI) > to do what you need in the userspace. Hi Michal, Thanks for the feedback. I had no doubt that this would be vehemently rejected on the mailing list, but I wanted feedback/opinions on it and thus sent it as anRFC. At best I thought perhaps the mechanisms I've employed might serve as inspiration for LMKD improvements in Android, since this hacky OOM killer I've devised does work quite well for the very specific usecase it is set out to address. The NUMA affinity and zone protection bits are helpful insights too. I'll take a look at PSI which Joel mentioned as well. Thanks, Sultan Alsawaf