linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Greg KH" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Riley Andrews" <riandrews@android.com>,
	devel@driverdev.osuosl.org, LKML <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>, "Michal Hocko" <mhocko@suse.com>,
	"Todd Kjos" <tkjos@google.com>,
	"Android Kernel Team" <kernel-team@android.com>,
	"Martijn Coenen" <maco@google.com>,
	"Rom Lemarchand" <romlem@google.com>
Subject: Re: [PATCH] staging, android: remove lowmemory killer from the tree
Date: Thu, 23 Feb 2017 12:24:57 -0800	[thread overview]
Message-ID: <CANcMJZBNe10dtK8ANtLSWS3UXeePhndN=S5otADhQdfQKOAhOw@mail.gmail.com> (raw)
In-Reply-To: <20170222120121.12601-1-mhocko@kernel.org>

On Wed, Feb 22, 2017 at 4:01 AM, Michal Hocko <mhocko@kernel.org> wrote:
> From: Michal Hocko <mhocko@suse.com>
>
> Lowmemory killer is sitting in the staging tree since 2008 without any
> serious interest for fixing issues brought up by the MM folks. The main
> objection is that the implementation is basically broken by design:
>         - it hooks into slab shrinker API which is not suitable for this
>           purpose. lowmem_count implementation just shows this nicely.
>           There is no scaling based on the memory pressure and no
>           feedback to the generic shrinker infrastructure.
>           Moreover lowmem_scan is called way too often for the heavy
>           work it performs.
>         - it is not reclaim context aware - no NUMA and/or memcg
>           awareness.
>
> As the code stands right now it just adds a maintenance overhead when
> core MM changes have to update lowmemorykiller.c as well. It also seems
> that the alternative LMK implementation will be solely in the userspace
> so this code has no perspective it seems. The staging tree is supposed
> to be for a code which needs to be put in shape before it can be merged
> which is not the case here obviously.

So, just for context, Android does have a userland LMK daemon (using
the mempressure notifiers) as you mentioned, but unfortunately I'm
unaware of any devices that ship with that implementation.

This is reportedly because while the mempressure notifiers provide a
the signal to userspace, the work the deamon then has to do to look up
per process memory usage, in order to figure out who is best to kill
at that point was too costly and resulted in poor device performance.

So for shipping Android devices, the LMK is still needed. However, its
not critical for basic android development, as the system will
function without it. Additionally I believe most vendors heavily
customize the LMK in their vendor tree, so the value of having it in
staging might be relatively low.

It would be great however to get a discussion going here on what the
ulmkd needs from the kernel in order to efficiently determine who best
to kill, and how we might best implement that.

thanks
-john

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-02-23 20:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 12:01 [PATCH] staging, android: remove lowmemory killer from the tree Michal Hocko
2017-02-23 20:24 ` John Stultz [this message]
2017-02-23 20:28   ` Todd Kjos
2017-02-23 20:36   ` Martijn Coenen
2017-02-24  9:34     ` Michal Hocko
2017-02-24 18:38       ` Tim Murray
2017-02-24 18:42         ` Rom Lemarchand
2017-03-04  2:06           ` Tim Murray
2017-02-24 12:19     ` peter enderborg
2017-02-24 12:28       ` Michal Hocko
2017-02-24 13:16         ` peter enderborg
2017-02-24 14:11           ` Michal Hocko
2017-02-24 14:42             ` peter enderborg
2017-02-24 15:03               ` Michal Hocko
2017-02-24 15:40                 ` peter enderborg
2017-02-24 15:52                   ` Michal Hocko
2017-02-24  9:38   ` Michal Hocko
2017-03-09  9:15 ` Michal Hocko
2017-03-09  9:30   ` Greg KH
2017-03-09 10:00     ` Michal Hocko
2017-03-09 12:48       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANcMJZBNe10dtK8ANtLSWS3UXeePhndN=S5otADhQdfQKOAhOw@mail.gmail.com' \
    --to=john.stultz@linaro.org \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maco@google.com \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=riandrews@android.com \
    --cc=romlem@google.com \
    --cc=tkjos@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).