Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller

2017-02-13 Thread peter enderborg
On 02/10/2017 10:15 AM, Michal Hocko wrote: > On Fri 10-02-17 10:05:34, peter enderborg wrote: >> On 02/10/2017 08:59 AM, Michal Hocko wrote: > [...] >>> The approach was wrong from the day 1. Abusing slab shrinkers >>> is just a bad place to stick this logic. This al

Re: [PATCH 0/3 staging-next] android: Lowmemmorykiller task tree

2017-02-13 Thread peter enderborg
On 02/10/2017 11:27 AM, Michal Hocko wrote: > [I have only now see this cover - it answers some of the questions I've > had to specific patches. It would be really great if you could use git > send-email to post patch series - it just does the right thing(tm)] > > On Thu 09-0

Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller

2017-02-15 Thread peter enderborg
On 02/14/2017 05:50 PM, Greg KH wrote: > On Tue, Feb 14, 2017 at 05:09:30PM +0100, peter.enderb...@sonymobile.com > wrote: >> From: Peter Enderborg >> >> This collects stats for shrinker calls and how much >> waste work we do within the lowmemorykiller. >&g

Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller

2017-02-15 Thread peter enderborg
On 02/14/2017 05:51 PM, Greg KH wrote: > On Tue, Feb 14, 2017 at 05:09:30PM +0100, peter.enderb...@sonymobile.com > wrote: >> From: Peter Enderborg >> >> This collects stats for shrinker calls and how much >> waste work we do within the lowmemorykiller. >&g

Re: [PATCH] staging, android: remove lowmemory killer from the tree

2017-02-24 Thread peter enderborg
On 02/23/2017 09:36 PM, Martijn Coenen wrote: > On Thu, Feb 23, 2017 at 9:24 PM, John Stultz wrote: >> 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 implementa

Re: [PATCH] staging, android: remove lowmemory killer from the tree

2017-02-24 Thread peter enderborg
On 02/24/2017 01:28 PM, Michal Hocko wrote: > On Fri 24-02-17 13:19:46, peter enderborg wrote: >> On 02/23/2017 09:36 PM, Martijn Coenen wrote: >>> On Thu, Feb 23, 2017 at 9:24 PM, John Stultz wrote: >>>> So, just for context, Android does have a userland LMK daem

Re: [PATCH] staging, android: remove lowmemory killer from the tree

2017-02-24 Thread peter enderborg
On 02/24/2017 03:11 PM, Michal Hocko wrote: > On Fri 24-02-17 14:16:34, peter enderborg wrote: >> On 02/24/2017 01:28 PM, Michal Hocko wrote: > [...] >>> Yeah, I strongly believe that the chosen approach is completely wrong. >>> Both in abusing the shrinker interfac

Re: [PATCH] staging, android: remove lowmemory killer from the tree

2017-02-24 Thread peter enderborg
On 02/24/2017 04:03 PM, Michal Hocko wrote: > On Fri 24-02-17 15:42:49, peter enderborg wrote: >> On 02/24/2017 03:11 PM, Michal Hocko wrote: >>> On Fri 24-02-17 14:16:34, peter enderborg wrote: >>>> On 02/24/2017 01:28 PM, Michal Hocko wrote: >>> [...]

Re: [RFC PATCH] binder: Don't require the binder lock when killed in binder_thread_read()

2017-04-03 Thread peter enderborg
On 03/31/2017 07:53 PM, Douglas Anderson wrote: > Sometimes when we're out of memory the OOM killer decides to kill a > process that's in binder_thread_read(). If we happen to be waiting > for work we'll get the kill signal and wake up. That's good. ...but > then we try to grab the binder lock b

[PATCH 0/3 staging-next] android: Lowmemmorykiller task tree

2017-02-09 Thread peter enderborg
Lowmemorykiller efficiency problem and a solution. Lowmemorykiller in android has a severe efficiency problem. The basic problem is that the registered shrinker gets called very often without anything actually happening. This is in some cases not a problem as it is a simple calculation that retu

[PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller

2017-02-09 Thread peter enderborg
This collects stats for shrinker calls and how much waste work we do within the lowmemorykiller. Signed-off-by: Peter Enderborg --- drivers/staging/android/Kconfig | 11 drivers/staging/android/Makefile| 1 + drivers/staging/android/lowmemorykiller.c

[PATCH 2/3 staging-next] oom: Add notification for oom_score_adj

2017-02-09 Thread peter enderborg
them in their own context so they do their actions with minimal system impact. Signed-off-by: Peter Enderborg --- fs/proc/base.c | 13 +++ include/linux/oom_score_notifier.h | 47 kernel/Makefile| 1 + kernel/fork.c

[PATCH 3/3 staging-next] mm: Remove RCU and tasklocks from lmk

2017-02-09 Thread peter enderborg
not intended to do any calculation changes other than we do use the cache for calculate the count values and that makes kswapd0 to shrink other areas. Signed-off-by: Peter Enderborg --- drivers/staging/android/Kconfig | 1 + drivers/staging/android/Makefile| 1

[PATCH 1/3 v2 staging-next] android: Collect statistics from lowmemorykiller

2017-02-09 Thread peter enderborg
This collects stats for shrinker calls and how much waste work we do within the lowmemorykiller. Signed-off-by: Peter Enderborg --- drivers/staging/android/Kconfig | 11 drivers/staging/android/Makefile| 1 + drivers/staging/android/lowmemorykiller.c

Re: [PATCH 1/3 v2 staging-next] android: Collect statistics from lowmemorykiller

2017-02-09 Thread peter enderborg
On 02/09/2017 09:13 PM, Greg Kroah-Hartman wrote: > On Thu, Feb 09, 2017 at 04:42:35PM +0100, peter enderborg wrote: >> This collects stats for shrinker calls and how much >> waste work we do within the lowmemorykiller. >> >> Signed-off-by: Peter Enderborg >>

Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller

2017-02-09 Thread peter enderborg
t;> On Thu, Feb 09, 2017 at 08:26:41PM +0100, Michal Hocko wrote: >>> On Thu 09-02-17 14:21:45, peter enderborg wrote: >>>> This collects stats for shrinker calls and how much >>>> waste work we do within the lowmemorykiller. >>> This doesn't exp

Re: [PATCH 3/3 staging-next] mm: Remove RCU and tasklocks from lmk

2017-02-09 Thread peter enderborg
On 02/09/2017 09:05 PM, Michal Hocko wrote: > On Thu 09-02-17 14:21:52, peter enderborg wrote: >> Fundamental changes: >> 1 Does NOT take any RCU lock in shrinker functions. >> 2 It returns same result for scan and counts, so we dont need to do >> shinker will know w

Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller

2017-02-10 Thread peter enderborg
On 02/10/2017 08:51 AM, Greg Kroah-Hartman wrote: > On Fri, Feb 10, 2017 at 08:21:32AM +0100, peter enderborg wrote: >> Im not speaking for google, but I think there is a work ongoing to >> replace this with user-space code. > Really? I have not heard this at all, any pointers

Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller

2017-02-10 Thread peter enderborg
On 02/10/2017 08:59 AM, Michal Hocko wrote: > On Fri 10-02-17 08:51:49, Greg KH wrote: >> On Fri, Feb 10, 2017 at 08:21:32AM +0100, peter enderborg wrote: > [...] >>> Until then we have to polish this version as good as we can. It is >>> essential for android as