Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340114

Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize in lowmem_scan()

From David Rientjes <rientjes@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize in lowmem_scan()
Date 2016-02-23 02:00 +0100
Message-ID <r59uy-5YU-11@gated-at.bofh.it> (permalink)
References <r2KgW-611-21@gated-at.bofh.it> <r2RLs-2yT-29@gated-at.bofh.it> <r2YjU-6VH-9@gated-at.bofh.it> <r3qJc-1Fp-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 18 Feb 2016, Xishi Qiu wrote:

> Does somebody do the work of re-implementation of the lowmem killer entirely
> now? Could you give me some details? e.g. when and how?
> 

I don't know of any plans or anybody working on reimplementing it to be 
correct, I simply don't think we should pile more patches on top of an 
already broken design.

> Here are another two questions.
> 1) lmk has several lowmem thresholds, it's "lowmem_minfree[]", and the value is
> static definition, so is it reasonable for different memory size(e.g. 2G/3G/4G...)
> of smart phones?

It looks like it is configurable from userspace and actually defaults to 
6MB, 8MB, 16MB, and 64MB in the kernel.  Reimplementing the lmk would have 
to take this design decision into consideration and replace it with 
something that would not cause existing userspace to break.

A sane implementation would be to do what vmpressure does in the kernel, 
and that is to signal userspace when certain thresholds are met.  
Userspace could then issue a SIGKILL to processes based on priority 
(/proc/pid/oom_score_adj is world-readable by default) and the oom killer 
will grant these processes access to memory reserves immediately if they 
cannot allocate the memory needed to exit.

> 2) There are many adjustable arguments in /proc/sys/vm/, and the default value
> maybe not benefit for smart phones, so any suggestions?
> 

I would assume that vm sysctls, like any other sysctls, would be tuned 
with initscripts depending on the configuration, if necessary.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() Xishi Qiu <qiuxishi@huawei.com> - 2016-02-16 10:40 +0100
  Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate  tasksize in lowmem_scan() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-16 18:40 +0100
    Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() David Rientjes <rientjes@google.com> - 2016-02-17 01:40 +0100
      Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() Xishi Qiu <qiuxishi@huawei.com> - 2016-02-17 09:50 +0100
        Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() David Rientjes <rientjes@google.com> - 2016-02-17 23:50 +0100
      Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate  tasksize in lowmem_scan() Michal Hocko <mhocko@kernel.org> - 2016-02-17 19:20 +0100
      Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() Xishi Qiu <qiuxishi@huawei.com> - 2016-02-18 08:00 +0100
        Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() David Rientjes <rientjes@google.com> - 2016-02-23 02:00 +0100
      Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() Xishi Qiu <qiuxishi@huawei.com> - 2016-02-18 11:30 +0100
        Re: [PATCH] mm: add MM_SWAPENTS and page table when calculate tasksize  in lowmem_scan() David Rientjes <rientjes@google.com> - 2016-02-23 02:00 +0100

csiph-web