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


Groups > linux.kernel > #1340112

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-9@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> <r3u0r-44o-25@gated-at.bofh.it> <r3u0r-44o-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 18 Feb 2016, Xishi Qiu wrote:

> How about kill more processes at one time?
> 
> Usually loading camera will alloc 300-500M memory immediately, so call lmk
> repeatedly is a waste of time.
> 
> And can we reclaim memory at one time instead of reclaim-alloc-reclaim-alloc...
> in this situation? e.g. use try_to_free_pages(), set nr_to_reclaim=300M
> 

I don't use the lmk myself and it's never been used on my phone, so I 
can't speak for the usecase.  However, killing more than one process at a 
time is generally a bad idea because it can allow processes to deplete 
memory reserves which may be small on these systems.  The lmk cannot be 
considered a hotpath, so waiting for a process to exit and free its memory 
for a small amount of time is generally not a bad trade-off when the 
alternative is to kill many processes (perhaps unnecessarily), open 
yourself up to livelock, and free memory that is potentially unneeded.

Back to linux.kernel | Previous | Next — Previous 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