Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-04-16 Thread Minchan Kim
Hi Johannes, On Thu, Apr 13, 2017 at 12:01:47PM -0400, Johannes Weiner wrote: > On Thu, Apr 13, 2017 at 01:30:47PM +0900, Minchan Kim wrote: > > On Thu, Mar 30, 2017 at 12:40:32PM -0700, Tim Murray wrote: > > > As a result, I think there's still a need for relative priority > > > between mem cgrou

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-04-13 Thread Johannes Weiner
On Thu, Mar 30, 2017 at 09:48:55AM -0700, Shakeel Butt wrote: > > A more useful metric for memory pressure at this point is quantifying > > that time you spend thrashing: time the job spends in direct reclaim > > and on the flipside time the job waits for recently evicted pages to > > come back. Co

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-04-13 Thread Johannes Weiner
On Thu, Apr 13, 2017 at 01:30:47PM +0900, Minchan Kim wrote: > On Thu, Mar 30, 2017 at 12:40:32PM -0700, Tim Murray wrote: > > As a result, I think there's still a need for relative priority > > between mem cgroups, not just an absolute limit. > > > > Does that make sense? > > I agree with it. >

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-04-12 Thread Minchan Kim
On Thu, Mar 30, 2017 at 12:40:32PM -0700, Tim Murray wrote: > On Thu, Mar 30, 2017 at 8:51 AM, Johannes Weiner wrote: > > In cgroup2, we've added a memory.low knob, where groups within their > > memory.low setting are not reclaimed. > > > > You can set that knob on foreground groups to the amount

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-30 Thread Tim Murray
On Thu, Mar 30, 2017 at 12:40 PM, Tim Murray wrote: > The current critical vmpressure event > hasn't been that successful in avoiding oom-killer (on 3.18, at > least)--I've been able to get oom-killer to trigger without a > vmpressure event. Looked at this some more, and this is almost certainly

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-30 Thread Tim Murray
On Thu, Mar 30, 2017 at 8:51 AM, Johannes Weiner wrote: > In cgroup2, we've added a memory.low knob, where groups within their > memory.low setting are not reclaimed. > > You can set that knob on foreground groups to the amount of memory > they need to function properly, and set it to 0 on backgro

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-30 Thread Shakeel Butt
> A more useful metric for memory pressure at this point is quantifying > that time you spend thrashing: time the job spends in direct reclaim > and on the flipside time the job waits for recently evicted pages to > come back. Combined, that gives you a good measure of overhead from > memory pressu

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-30 Thread Johannes Weiner
Hi Tim, On Fri, Mar 17, 2017 at 04:16:35PM -0700, Tim Murray wrote: > Hi all, > > I've been working to improve Android's memory management and drop > lowmemorykiller from the kernel, and I'd like to get some feedback on a small > patch with a lot of side effects. > > Currently, when an Androi

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-30 Thread Tim Murray
Sorry for the delay on my end as well. I realized that given multiple equivalent prioritization implementations, my favorite would be the one that provides the clearest signal to vmpressure. I've been experimenting with different approaches to using memcg priority in vmpressure, and I'm cautiously

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-29 Thread Minchan Kim
To memcg maintainer, Could you comment about this topic? On Fri, Mar 17, 2017 at 04:16:35PM -0700, Tim Murray wrote: > Hi all, > > I've been working to improve Android's memory management and drop > lowmemorykiller from the kernel, and I'd like to get some feedback on a small > patch with a lo

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-22 Thread Vinayak Menon
On 3/20/2017 8:53 PM, Johannes Weiner wrote: > On Mon, Mar 20, 2017 at 07:28:53PM +0530, Vinayak Menon wrote: >> From the discussions @ https://lkml.org/lkml/2017/3/3/752, I assume you are >> trying >> per-app memcg. We were trying to implement per app memory cgroups and were >> encountering some

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-21 Thread Minchan Kim
On Wed, Mar 22, 2017 at 01:41:17PM +0900, Minchan Kim wrote: > Hi Tim, > > On Tue, Mar 21, 2017 at 10:18:26AM -0700, Tim Murray wrote: > > On Sun, Mar 19, 2017 at 10:59 PM, Minchan Kim wrote: > > > However, I'm not sure your approach is good. It seems your approach just > > > reclaims pages from

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-21 Thread Minchan Kim
Hi Tim, On Tue, Mar 21, 2017 at 10:18:26AM -0700, Tim Murray wrote: > On Sun, Mar 19, 2017 at 10:59 PM, Minchan Kim wrote: > > However, I'm not sure your approach is good. It seems your approach just > > reclaims pages from groups (DEF_PRIORITY - memcg->priority) >= sc->priority. > > IOW, it is b

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-21 Thread Tim Murray
On Sun, Mar 19, 2017 at 10:59 PM, Minchan Kim wrote: > However, I'm not sure your approach is good. It seems your approach just > reclaims pages from groups (DEF_PRIORITY - memcg->priority) >= sc->priority. > IOW, it is based on *temporal* memory pressure fluctuation sc->priority. > > Rather than

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-20 Thread Johannes Weiner
On Mon, Mar 20, 2017 at 07:28:53PM +0530, Vinayak Menon wrote: > From the discussions @ https://lkml.org/lkml/2017/3/3/752, I assume you are > trying > per-app memcg. We were trying to implement per app memory cgroups and were > encountering some issues > (https://www.spinics.net/lists/linux-mm/m

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-20 Thread Vinayak Menon
On Fri, Mar 17, 2017 at 04:16:35PM -0700, Tim Murray wrote: Hi Tim, >> Hi all, >> >> I've been working to improve Android's memory management and drop >> lowmemorykiller from the kernel, and I'd like to get some feedback on a >> small patch with a lot of side effects. >> >> Currently, when an

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-20 Thread Kyungmin Park
On Sat, Mar 18, 2017 at 8:16 AM, Tim Murray wrote: > Hi all, > > I've been working to improve Android's memory management and drop > lowmemorykiller from the kernel, and I'd like to get some feedback on a small > patch with a lot of side effects. > > Currently, when an Android device is under me

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-20 Thread peter enderborg
Hi Tim. Do you have a link to the new version lmkd? On 03/18/2017 12:16 AM, Tim Murray wrote: > Hi all, > > I've been working to improve Android's memory management and drop > lowmemorykiller from the kernel, and I'd like to get some feedback on a small > patch with a lot of side effects. > > C

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-19 Thread Minchan Kim
Hello, On Fri, Mar 17, 2017 at 04:16:35PM -0700, Tim Murray wrote: > Hi all, > > I've been working to improve Android's memory management and drop > lowmemorykiller from the kernel, and I'd like to get some feedback on a small > patch with a lot of side effects. > > Currently, when an Android

[RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-17 Thread Tim Murray
Hi all, I've been working to improve Android's memory management and drop lowmemorykiller from the kernel, and I'd like to get some feedback on a small patch with a lot of side effects. Currently, when an Android device is under memory pressure, one of three things will happen from kswapd: 1