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

2016-02-22 Thread David Rientjes
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

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

2016-02-22 Thread David Rientjes
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

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

2016-02-22 Thread David Rientjes
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

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

2016-02-22 Thread David Rientjes
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

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

2016-02-18 Thread Xishi Qiu
On 2016/2/18 15:55, Figo.zhang wrote: > > > 2016-02-17 8:35 GMT+08:00 David Rientjes >: > > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > > > On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > > > Currently tasksize

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

2016-02-18 Thread Xishi Qiu
On 2016/2/18 15:55, Figo.zhang wrote: > > > 2016-02-17 8:35 GMT+08:00 David Rientjes >: > > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > > > On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > > > Currently tasksize in lowmem_scan() only

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

2016-02-17 Thread Xishi Qiu
On 2016/2/17 8:35, David Rientjes wrote: > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > >> On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: >>> Currently tasksize in lowmem_scan() only calculate rss, and not include >>> swap. >>> But usually smart phones enable zram, so swap space

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

2016-02-17 Thread Xishi Qiu
On 2016/2/17 8:35, David Rientjes wrote: > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > >> On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: >>> Currently tasksize in lowmem_scan() only calculate rss, and not include >>> swap. >>> But usually smart phones enable zram, so swap space

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

2016-02-17 Thread David Rientjes
On Wed, 17 Feb 2016, Xishi Qiu wrote: > Hi David, > > Thanks for your advice. > > I have a stupid question, what's the main difference between lmk and oom? Hi Xishi, it's not a stupid question at all! Low memory killer appears to be implemented as a generic shrinker that iterates through the

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

2016-02-17 Thread David Rientjes
On Wed, 17 Feb 2016, Xishi Qiu wrote: > Hi David, > > Thanks for your advice. > > I have a stupid question, what's the main difference between lmk and oom? Hi Xishi, it's not a stupid question at all! Low memory killer appears to be implemented as a generic shrinker that iterates through the

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

2016-02-17 Thread Michal Hocko
On Tue 16-02-16 16:35:39, David Rientjes wrote: > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > > > On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > > > Currently tasksize in lowmem_scan() only calculate rss, and not include > > > swap. > > > But usually smart phones enable zram,

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

2016-02-17 Thread Michal Hocko
On Tue 16-02-16 16:35:39, David Rientjes wrote: > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > > > On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > > > Currently tasksize in lowmem_scan() only calculate rss, and not include > > > swap. > > > But usually smart phones enable zram,

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

2016-02-17 Thread Xishi Qiu
On 2016/2/17 8:35, David Rientjes wrote: > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > >> On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: >>> Currently tasksize in lowmem_scan() only calculate rss, and not include >>> swap. >>> But usually smart phones enable zram, so swap space

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

2016-02-17 Thread Xishi Qiu
On 2016/2/17 8:35, David Rientjes wrote: > On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > >> On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: >>> Currently tasksize in lowmem_scan() only calculate rss, and not include >>> swap. >>> But usually smart phones enable zram, so swap space

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

2016-02-16 Thread David Rientjes
On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > > Currently tasksize in lowmem_scan() only calculate rss, and not include > > swap. > > But usually smart phones enable zram, so swap space actually use ram. > > Yes, but does that

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

2016-02-16 Thread David Rientjes
On Tue, 16 Feb 2016, Greg Kroah-Hartman wrote: > On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > > Currently tasksize in lowmem_scan() only calculate rss, and not include > > swap. > > But usually smart phones enable zram, so swap space actually use ram. > > Yes, but does that

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

2016-02-16 Thread Greg Kroah-Hartman
On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > Currently tasksize in lowmem_scan() only calculate rss, and not include swap. > But usually smart phones enable zram, so swap space actually use ram. Yes, but does that matter for this type of calculation? I need an ack from the

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

2016-02-16 Thread Greg Kroah-Hartman
On Tue, Feb 16, 2016 at 05:37:05PM +0800, Xishi Qiu wrote: > Currently tasksize in lowmem_scan() only calculate rss, and not include swap. > But usually smart phones enable zram, so swap space actually use ram. Yes, but does that matter for this type of calculation? I need an ack from the

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

2016-02-16 Thread Xishi Qiu
Currently tasksize in lowmem_scan() only calculate rss, and not include swap. But usually smart phones enable zram, so swap space actually use ram. Signed-off-by: Xishi Qiu --- drivers/staging/android/lowmemorykiller.c | 5 - 1 file changed, 4 insertions(+), 1

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

2016-02-16 Thread Xishi Qiu
Currently tasksize in lowmem_scan() only calculate rss, and not include swap. But usually smart phones enable zram, so swap space actually use ram. Signed-off-by: Xishi Qiu --- drivers/staging/android/lowmemorykiller.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git