Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3970067yba; Tue, 7 May 2019 09:55:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzavmjzyjR2Dy2Jb2kx0nratpjAgh2VYe/fk6TMipWhyrpsOlT98G8M6Ck2sa/lA3wrQCS X-Received: by 2002:a63:31d7:: with SMTP id x206mr39921556pgx.74.1557248122715; Tue, 07 May 2019 09:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557248122; cv=none; d=google.com; s=arc-20160816; b=jPiomGxQlSab3NPJTXYK9h6Q+TfOV64RJcrcbc0+V+safgdRuY81nxJPnG10IBIrqK 5BJwOaIWis73wqX2wgd1gpoEUX0nU9B1dq7cxhYL1MA458+cTpMkFi5h7CHKxTKoIy+L fJbpR4KvmEvGHtLg10y7Ktko8eJ2fxdiyBrHuiWpuT6NBsw0kCFIyOZasR4+TokRRiJf BAU0nBn0ZxZSc5lpK/Ey+IkqtrVGXFf1NDxRJ0ibLJMbXkYOBwMHqH4Fw39BS6oeubDj 8VCWh64y50bkiDB+EwePN08VTZCH+ZmYIv9yTLeEHq04CqiHpX4p588qG12DX7baQ6zH 1/Jg== 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=Les20PwGqp+bpDrgm0vkN1QrGvdMFh2R5hcLIBFlpD8=; b=vkzMc2hXVxjC5Hl9p/brVwLZ+5fYDKngmO3CjAG+wa7ZJxanDWJBqQildxq78Zeu9Q gTUL7SQYgTOmjnZp1N/NRNgQlEUEspjUHp6Zfmlh/nJZBT4uJMN9ZFVHlkIQGr5/Rw4i bFYersMF19UhsLpmINp471zWqX8+owfzLXqHWJfLRRSZ92eM/2s6M1m40dEjOgdCJ0Yr f8fHoXKlhGfwpTtbQGPfEztmfRO+shv/LGHMrccmhCMDjsu+ttjWRVgmYiVDlhGZSMyw BS000q0tlVvQWFFWcRY89g4FHP24dn/H9MrVNyvrP/yaBlrYtW3V/T8f4bh5pAlU0Sxm A41w== 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 o70si20192695pfa.33.2019.05.07.09.55.05; Tue, 07 May 2019 09:55:22 -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 S1726795AbfEGQxu (ORCPT + 99 others); Tue, 7 May 2019 12:53:50 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:33080 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbfEGQxt (ORCPT ); Tue, 7 May 2019 12:53:49 -0400 Received: by mail-oi1-f194.google.com with SMTP id m204so7251937oib.0 for ; Tue, 07 May 2019 09:53:49 -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=Les20PwGqp+bpDrgm0vkN1QrGvdMFh2R5hcLIBFlpD8=; b=dnSB+XRIjwF/l8UC7pQKw/w4k3p4XRYXQZ/QWDWgDOKaWccHR8UsdzXo8SSnP3GgK1 haPIu5TbTWBM740z761n0cgE33Fgt1W4eiZhBKOXOIK6uliRWx0tKijSQFavpMBi3dVb g4d4jqxqTRec+fAiX32zImRgn/WMsYUFhJCYSgX9xYS/TbieT9lALLPJhqLo0jlT70uH EedWoM1e7bCBw1ugQuQ+713vvuKY2cad2z93Q8uEjTcalRx/Vq/f3NxKHkDPpltctJd1 rVZxxXexoEjQm02WrMCeCDgK3SDE20CHvlhSsFWvMk2Qs2DC6i9giFF299kw+WdUfEgE AuVQ== X-Gm-Message-State: APjAAAVa90i1K34JFXsGEiMyEZhRmVMBYu6x3t5F1G9dMs0oAGlFS4MG /4N2tLkMUMPOyJ/6D9SBxHU= X-Received: by 2002:aca:bf07:: with SMTP id p7mr785143oif.140.1557248029127; Tue, 07 May 2019 09:53:49 -0700 (PDT) Received: from sultan-box.localdomain ([107.193.118.89]) by smtp.gmail.com with ESMTPSA id e4sm4538586otr.50.2019.05.07.09.53.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2019 09:53:48 -0700 (PDT) Date: Tue, 7 May 2019 09:53:44 -0700 From: Sultan Alsawaf To: Suren Baghdasaryan Cc: Christian Brauner , Greg Kroah-Hartman , "open list:ANDROID DRIVERS" , Daniel Colascione , Todd Kjos , Kees Cook , Peter Zijlstra , Martijn Coenen , LKML , Tim Murray , Michal Hocko , linux-mm , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Ingo Molnar , Steven Rostedt , Oleg Nesterov , Joel Fernandes , Andy Lutomirski , kernel-team Subject: Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android Message-ID: <20190507165344.GA12201@sultan-box.localdomain> References: <20190319231020.tdcttojlbmx57gke@brauner.io> <20190320015249.GC129907@google.com> <20190507021622.GA27300@sultan-box.localdomain> <20190507070430.GA24150@kroah.com> <20190507072721.GA4364@sultan-box.localdomain> <20190507074334.GB26478@kroah.com> <20190507081236.GA1531@sultan-box.localdomain> <20190507105826.oi6vah6x5brt257h@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, May 07, 2019 at 09:28:47AM -0700, Suren Baghdasaryan wrote: > Hi Sultan, > Looks like you are posting this patch for devices that do not use > userspace LMKD solution due to them using older kernels or due to > their vendors sticking to in-kernel solution. If so, I see couple > logistical issues with this patch. I don't see it being adopted in > upstream kernel 5.x since it re-implements a deprecated mechanism even > though vendors still use it. Vendors on the other hand, will not adopt > it until you show evidence that it works way better than what > lowmemorykilled driver does now. You would have to provide measurable > data and explain your tests before they would consider spending time > on this. Yes, this is mostly for the devices already produced that are forced to suffer with poor memory management. I can't even convince vendors to fix kernel memory leaks, so there's no way I'd be able to convince them of trying this patch, especially since it seems like you're having trouble convincing vendors to stop using lowmemorykiller in the first place. And thankfully, convincing vendors isn't my job :) > On the implementation side I'm not convinced at all that this would > work better on all devices and in all circumstances. We had cases when > a new mechanism would show very good results until one usecase > completely broke it. Bulk killing of processes that you are doing in > your patch was a very good example of such a decision which later on > we had to rethink. That's why baking these policies into kernel is > very problematic. Another problem I see with the implementation that > it ties process killing with the reclaim scan depth. It's very similar > to how vmpressure works and vmpressure in my experience is very > unpredictable. Could you elaborate a bit on why bulk killing isn't good? > > > I linked in the previous message, Google made a rather large set of > > > modifications to the supposedly-defunct lowmemorykiller.c not one month ago. > > > What's going on? > > If you look into that commit, it adds ability to report kill stats. If > that was a change in how that driver works it would be rejected. Fair, though it was quite strange seeing something that was supposedly totally abandoned receiving a large chunk of code for reporting stats. Thanks, Sultan