Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1504297imc; Mon, 11 Mar 2019 15:37:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeprbY7VoaUXcW2bCtdKeeBV3aMH83mRy74agwBZAi52Sx/68gpxJT/n094kB3AvpheR7m X-Received: by 2002:a63:535c:: with SMTP id t28mr32428715pgl.128.1552343832723; Mon, 11 Mar 2019 15:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552343832; cv=none; d=google.com; s=arc-20160816; b=vhD5BE6DS/SlSz9BTctfd/4Z4vVEjq0i0GN4KEr0lEscODPVmP7dWfnYusEtIqgDMM lNSUR8tLkLmJGHdOKiyphFncU7WUUf2RmnzP603+HjgHwZtJ7PiBRSpQrRqm1WZN98aH LGUfpK1VKurJOy7QV1NC+mNFQtpxIsHeV8tmpseYNDqspEOa+EL01IIKXuJppr2rcCn/ pDevtzEV94F/hM4I3rPvHvzXjb1d0ySqQFx7To4BMDYMaEtpLNqqVSdeYIW5fCuvUStU 6vsp6LF1X8dQHCeTwvqP+tbdxh6GxWLtJQNLHA3BAKPm2p0A/kWQ0+W6ApuaHKdadkFO b+Ig== 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=FTSLkO2dt0jTP41e0HX+zZNoDtNdiga3jBAnHIfBWR8=; b=usrYDOXgcioUEsDlt7vYVdytd7VEVjE3B3rQz2SggWUifdvIzgKBWHyos75lDgX/FL V6eBOC1QrWLFgEoB+a5lSztbbforBf0TyC+AEcx2OV1pKGKUyp7Ye5aNR4ellj2PZS9x R8YCVjGJVnFDSs5zKvXO6CQLO0x4nP5uqJI79ndMZy1q5oivt6yS46aXP1nKexjyDEoL FlW175nFyQijO2cnGsq9FLS4g8IcWW4SFxIBFFy1qE/ZRyQb63gNtjdJCwDt40f2G7HH qgcK852Y/v3nUIFvaIo1LAkQZA/ru8EKm+apfD3hbXlsQjYu1M+LxmquPTYiuuLyiLMY 7mAA== 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 n81si6129656pfh.272.2019.03.11.15.36.56; Mon, 11 Mar 2019 15:37:12 -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 S1726192AbfCKWgh (ORCPT + 99 others); Mon, 11 Mar 2019 18:36:37 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:35779 "EHLO mail-pf1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbfCKWgh (ORCPT ); Mon, 11 Mar 2019 18:36:37 -0400 Received: by mail-pf1-f181.google.com with SMTP id j5so313230pfa.2 for ; Mon, 11 Mar 2019 15:36:36 -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=FTSLkO2dt0jTP41e0HX+zZNoDtNdiga3jBAnHIfBWR8=; b=HptzQuhaRYPUAKJbDoKaM1yu+MoeT0/T3sCt3vraAxisPvfaYaNRu7n1+Z15ZZQkyy GWCQdr4JvrNByGweMK7Xv9vJbbJMzDnb4o9QNEaQVHu8iNKjB1GykkwNBmQ4x3zVUdNJ JNg38IQ4MPhmi/xddPTTfH0/M1vUenaFh9vZuU3arqCFWpnzjGtbQlPCn1OqrQrnjnPc C0z/1olDCAVgVKeWi4qIAWAamYlDn1h4VWMVmKzmNdgi/1Z+s/tSG85SH1eY1tHeUV0D BlzXZvsZUeUh7FRaWfXCevy1xFhEJcZeYqm5GHRHlhe02Vo19QoCGUqm+XLRmBIUkovQ PFYw== X-Gm-Message-State: APjAAAXuvKNdd8l5Hpz59lgn75uxlDmehRTouHSUcH53vwySEbOJnCac t+PmNbKaBW/6yKXZ9OdnXIxvio0nF6Y= X-Received: by 2002:a62:2ad1:: with SMTP id q200mr34726914pfq.34.1552343796423; Mon, 11 Mar 2019 15:36:36 -0700 (PDT) Received: from sultan-box.localdomain (campus-061-148.ucdavis.edu. [168.150.61.148]) by smtp.gmail.com with ESMTPSA id g67sm16424983pfg.13.2019.03.11.15.36.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Mar 2019 15:36:35 -0700 (PDT) Date: Mon, 11 Mar 2019 15:36:31 -0700 From: Sultan Alsawaf To: Suren Baghdasaryan Cc: Michal Hocko , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Ingo Molnar , Peter Zijlstra , LKML , devel@driverdev.osuosl.org, linux-mm , Tim Murray Subject: Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android Message-ID: <20190311223631.GA872@sultan-box.localdomain> References: <20190310203403.27915-1-sultan@kerneltoast.com> <20190311174320.GC5721@dhcp22.suse.cz> <20190311175800.GA5522@sultan-box.localdomain> <20190311204626.GA3119@sultan-box.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 03:15:35PM -0700, Suren Baghdasaryan wrote: > This what LMKD currently is - a userspace RT process. > My point was that this page allocation queue that you implemented > can't be implemented in userspace, at least not without extensive > communication with kernel. Oh, that's easy to address. My page allocation queue and the decision on when to kill a process are orthogonal. In fact, the page allocation queue could be touched up a bit to factor in the issues Michal mentioned, and it can be implemented as an improvement to the existing OOM killer. The point of it is just to ensure that page allocation requests that have gone OOM are given priority over other allocation requests when free pages start to trickle in. Userspace doesn't need to know about the page allocation queue, and the queue is not necessary to implement the method of determining when to kill processes that I've proposed. It's an optimization, not a necessity. Thanks, Sultan