Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3400788yba; Tue, 7 May 2019 00:07:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKx7w2um21B6nea+7Ra+lxNL+CSGQJGA+W7VAAHS4mf39vczqnkL6USgRWotpFgrMP8H0i X-Received: by 2002:a17:902:20cb:: with SMTP id v11mr38074627plg.324.1557212840776; Tue, 07 May 2019 00:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557212840; cv=none; d=google.com; s=arc-20160816; b=lUoC+C9wdJIjn+BGBhg57msMc2z6TkDDm+wFvX5Rf/DXCSOOQr8Z1s/3BKSNDO8rn+ yF+5vCypEs4GOdp8rCYxjQdzzUV3sTGmDybNQUVf0GjaJtPqBkC+1TdtR3hy2xOfI7Bq NKK7gEfQfbAzCt6LKISza/ocHKFoAAqetkQiyQvpGaA2FNvuuLerpR5Too5Hb+F5/nc3 iEs3PrSs6iVst8ER1t9xSb+6l6BBLwYYoObgEfJy2Ocdj3C8WYlrqoSGxMROmKmWgICy T/OCdcEQlQBcSjXdtClH4pZWOlhq+9doFdryv8zppfBwJrNETR5G49E+R/Hf5XrGmDMs VMfA== 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:dkim-signature; bh=AZRk3rRqBTTychjO+BtavUXYIcxvQ60zWhwfPkgHSb8=; b=mu9nSUsaWiMNIdNKcFmUsc1UiGG1HKO/MA4ewCjDPeuFIgWTWlyar7Tp5XIvwOdEwF 3pCo9iDmmV4MQXqsyZ6Z9Fti8Z//Sywha9ayYbt+eMior5fSM924/xhSI2PI82hk526i UAoccHHLVWv09Lt1tJL7Ou81WDG3Fqgfm3Q57B94K2UNkv8MOFRmEYDu/u3Yc0rPWz64 0AhCGY8SjnMrC3jF4aWk6VSZ8Q8LQZ7+fphHarmXQm8inmqF+Q0xC8yYUvQLl1ODPcKx ah7IRLQ+EZ/Wz7hbLSLRKms93jgsrs2FsrJaUnDAiSxnFAS5Iv1kP/zDNmum+v/HNpr4 lLDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1NwSfNdi; 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 j5si16851311pgq.566.2019.05.07.00.07.04; Tue, 07 May 2019 00:07:20 -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; dkim=pass header.i=@kernel.org header.s=default header.b=1NwSfNdi; 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 S1726776AbfEGHEe (ORCPT + 99 others); Tue, 7 May 2019 03:04:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:46082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726253AbfEGHEd (ORCPT ); Tue, 7 May 2019 03:04:33 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7A59721019; Tue, 7 May 2019 07:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557212673; bh=hNi2vt1qB3b6X3N9lBhgsKLvokmDdrvsjVx/J28EZ90=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1NwSfNdiJdTpK3PxZVb09tk48+2+AXcgrQl+ONIUsuxrfaxWSH5EVRvzyWG0q5iZK GoU2xj/aHaJYSzTAqERyT8jaORLr94yQ1si1oFuQ21nMGXDmmeQt8N0QaISagR8JcU YXN8lw0eZwmxKlwz0uu4QBqj9nvLINBiTWHmBxHY= Date: Tue, 7 May 2019 09:04:30 +0200 From: Greg Kroah-Hartman To: Sultan Alsawaf Cc: "open list:ANDROID DRIVERS" , Daniel Colascione , kernel-team , Todd Kjos , Kees Cook , Peter Zijlstra , LKML , Tim Murray , Michal Hocko , linux-mm , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Ingo Molnar , Martijn Coenen , Steven Rostedt , Oleg Nesterov , Joel Fernandes , Andy Lutomirski , Suren Baghdasaryan , Christian Brauner Subject: Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android Message-ID: <20190507070430.GA24150@kroah.com> References: <20190317015306.GA167393@google.com> <20190317114238.ab6tvvovpkpozld5@brauner.io> <20190318002949.mqknisgt7cmjmt7n@brauner.io> <20190318235052.GA65315@google.com> <20190319221415.baov7x6zoz7hvsno@brauner.io> <20190319231020.tdcttojlbmx57gke@brauner.io> <20190320015249.GC129907@google.com> <20190507021622.GA27300@sultan-box.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190507021622.GA27300@sultan-box.localdomain> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 06, 2019 at 07:16:22PM -0700, Sultan Alsawaf wrote: > This is a complete low memory killer solution for Android that is small > and simple. Processes are killed according to the priorities that > Android gives them, so that the least important processes are always > killed first. Processes are killed until memory deficits are satisfied, > as observed from kswapd struggling to free up pages. Simple LMK stops > killing processes when kswapd finally goes back to sleep. > > The only tunables are the desired amount of memory to be freed per > reclaim event and desired frequency of reclaim events. Simple LMK tries > to free at least the desired amount of memory per reclaim and waits > until all of its victims' memory is freed before proceeding to kill more > processes. > > Signed-off-by: Sultan Alsawaf > --- > Hello everyone, > > I've addressed some of the concerns that were brought up with the first version > of the Simple LMK patch. I understand that a kernel-based solution like this > that contains policy decisions for a specific userspace is not the way to go, > but the Android ecosystem still has a pressing need for a low memory killer that > works well. > > Most Android devices still use the ancient and deprecated lowmemorykiller.c > kernel driver; Simple LMK seeks to replace that, at the very least until PSI and > a userspace daemon utilizing PSI are ready for *all* Android devices, and not > just the privileged Pixel phone line. Um, why can't "all" Android devices take the same patches that the Pixel phones are using today? They should all be in the public android-common kernel repositories that all Android devices should be syncing with on a weekly/monthly basis anyway, right? thanks, greg k-h