Re: [PATCH v3 4/4] mm/docs: describe memory.low refinements

2018-04-05 Thread Johannes Weiner
On Thu, Apr 05, 2018 at 07:59:21PM +0100, Roman Gushchin wrote: > Refine cgroup v2 docs after latest memory.low changes. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Andrew Morton <a...@linux-foundation.org> > Cc: Johannes Weiner <han...@cmpxchg.org> >

Re: [patch -mm v2 2/3] mm, memcg: replace cgroup aware oom killer mount option with tunable

2018-01-30 Thread Johannes Weiner
adness > of its tasks. This might result in an over accounting because of the > oom_score_adj setting. Document this for now. > > Acked-by: Roman Gushchin <g...@fb.com> > Signed-off-by: Michal Hocko <mho...@suse.com> Acked-by: Johannes Weiner <han...@cmpxchg.org> -- T

Re: [PATCH v13 0/7] cgroup-aware OOM killer

2018-01-15 Thread Johannes Weiner
On Sun, Jan 14, 2018 at 03:44:09PM -0800, David Rientjes wrote: > On Sat, 13 Jan 2018, Johannes Weiner wrote: > > > You don't have any control and no accounting of the stuff situated > > inside the root cgroup, so it doesn't make sense to leave anything in > > there while

Re: [PATCH v13 0/7] cgroup-aware OOM killer

2018-01-13 Thread Johannes Weiner
On Wed, Jan 10, 2018 at 11:33:45AM -0800, Andrew Morton wrote: > On Wed, 10 Jan 2018 05:11:44 -0800 Roman Gushchin wrote: > > On Tue, Jan 09, 2018 at 04:57:53PM -0800, David Rientjes wrote: > > > On Thu, 30 Nov 2017, Andrew Morton wrote: > > > > > This patchset makes the OOM killer

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Johannes Weiner
On Tue, Oct 31, 2017 at 10:50:43AM -0700, Shakeel Butt wrote: > On Tue, Oct 31, 2017 at 9:40 AM, Johannes Weiner <han...@cmpxchg.org> wrote: > > On Tue, Oct 31, 2017 at 08:04:19AM -0700, Shakeel Butt wrote: > >> > + > >> > +static void select_victi

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Johannes Weiner
On Tue, Oct 31, 2017 at 08:04:19AM -0700, Shakeel Butt wrote: > > + > > +static void select_victim_memcg(struct mem_cgroup *root, struct > > oom_control *oc) > > +{ > > + struct mem_cgroup *iter; > > + > > + oc->chosen_memcg = NULL; > > + oc->chosen_points = 0; > > + > > +

Re: [RESEND v12 0/6] cgroup-aware OOM killer

2017-10-27 Thread Johannes Weiner
On Thu, Oct 26, 2017 at 02:03:41PM -0700, David Rientjes wrote: > On Thu, 26 Oct 2017, Johannes Weiner wrote: > > > > The nack is for three reasons: > > > > > > (1) unfair comparison of root mem cgroup usage to bias against that mem > > > cgr

Re: [RESEND v12 0/6] cgroup-aware OOM killer

2017-10-19 Thread Johannes Weiner
On Thu, Oct 19, 2017 at 07:52:12PM +0100, Roman Gushchin wrote: > This patchset makes the OOM killer cgroup-aware. Hi Andrew, I believe this code is ready for merging upstream, and it seems Michal is in agreement. There are two main things to consider, however. David would have really liked for

Re: [v10 5/6] mm, oom: add cgroup v2 mount option for cgroup-aware OOM killer

2017-10-05 Thread Johannes Weiner
On Thu, Oct 05, 2017 at 03:14:19PM +0200, Michal Hocko wrote: > On Wed 04-10-17 16:04:53, Johannes Weiner wrote: > [...] > > That will silently ignore what the user writes to the memory.oom_group > > control files across the system's cgroup tree. > > > > We'll have

Re: [v10 3/6] mm, oom: cgroup-aware OOM killer

2017-10-05 Thread Johannes Weiner
On Thu, Oct 05, 2017 at 01:40:09AM -0700, David Rientjes wrote: > On Wed, 4 Oct 2017, Johannes Weiner wrote: > > > > By only considering leaf memcgs, does this penalize users if their memcg > > > becomes oc->chosen_memcg purely because it has aggregated all of its &g

Re: [v10 3/6] mm, oom: cgroup-aware OOM killer

2017-10-04 Thread Johannes Weiner
On Wed, Oct 04, 2017 at 01:27:14PM -0700, David Rientjes wrote: > By only considering leaf memcgs, does this penalize users if their memcg > becomes oc->chosen_memcg purely because it has aggregated all of its > processes to be members of that memcg, which would otherwise be the > standard

Re: [v10 3/6] mm, oom: cgroup-aware OOM killer

2017-10-04 Thread Johannes Weiner
On Wed, Oct 04, 2017 at 01:17:14PM -0700, David Rientjes wrote: > On Wed, 4 Oct 2017, Roman Gushchin wrote: > > > > > @@ -828,6 +828,12 @@ static void __oom_kill_process(struct task_struct > > > > *victim) > > > > struct mm_struct *mm; > > > > bool can_oom_reap = true; > > > >

Re: [v10 6/6] mm, oom, docs: describe the cgroup-aware OOM killer

2017-10-04 Thread Johannes Weiner
On Wed, Oct 04, 2017 at 04:46:38PM +0100, Roman Gushchin wrote: > Document the cgroup-aware OOM killer. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Michal Hocko <mho...@kernel.org> > Cc: Vladimir Davydov <vdavydov....@gmail.com> > Cc: Johannes Wein

Re: [v10 5/6] mm, oom: add cgroup v2 mount option for cgroup-aware OOM killer

2017-10-04 Thread Johannes Weiner
e changed dynamically by remounting the cgroupfs. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Michal Hocko <mho...@kernel.org> > Cc: Vladimir Davydov <vdavydov@gmail.com> > Cc: Johannes Weiner <han...@cmpxchg.org> > Cc: Tetsuo Handa <penguin-ker...@i-l

Re: [v10 4/6] mm, oom: introduce memory.oom_group

2017-10-04 Thread Johannes Weiner
will never touch any tasks > outside of the scope of the OOM event. > > Also, tasks with oom_score_adj set to -1000 will not be killed. > > The default value is 0. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Michal Hocko <mho...@kernel.org> > Cc: Vlad

Re: [v10 3/6] mm, oom: cgroup-aware OOM killer

2017-10-04 Thread Johannes Weiner
belonging tasks. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Michal Hocko <mho...@kernel.org> > Cc: Vladimir Davydov <vdavydov@gmail.com> > Cc: Johannes Weiner <han...@cmpxchg.org> > Cc: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> > Cc: Da

Re: [v10 2/6] mm: implement mem_cgroup_scan_tasks() for the root memory cgroup

2017-10-04 Thread Johannes Weiner
e OOM killer, > which will use this function to iterate over tasks belonging > to the root memcg. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Acked-by: Michal Hocko <mho...@suse.com> > Cc: Vladimir Davydov <vdavydov@gmail.com> > Cc: Joha

Re: [v10 1/6] mm, oom: refactor the oom_kill_process() function

2017-10-04 Thread Johannes Weiner
chal Hocko <mho...@kernel.org> > Acked-by: David Rientjes <rient...@google.com> > Cc: Vladimir Davydov <vdavydov@gmail.com> > Cc: Johannes Weiner <han...@cmpxchg.org> > Cc: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> > Cc: David Rientjes <ri

Re: [v8 0/4] cgroup-aware OOM killer

2017-10-02 Thread Johannes Weiner
On Mon, Oct 02, 2017 at 01:24:25PM -0700, Shakeel Butt wrote: > On Mon, Oct 2, 2017 at 12:56 PM, Michal Hocko wrote: > > On Mon 02-10-17 12:45:18, Shakeel Butt wrote: > >> > I am sorry to cut the rest of your proposal because it simply goes over > >> > the scope of the proposed

Re: [v8 0/4] cgroup-aware OOM killer

2017-09-26 Thread Johannes Weiner
On Tue, Sep 26, 2017 at 03:30:40PM +0200, Michal Hocko wrote: > On Tue 26-09-17 13:13:00, Roman Gushchin wrote: > > On Tue, Sep 26, 2017 at 01:21:34PM +0200, Michal Hocko wrote: > > > On Tue 26-09-17 11:59:25, Roman Gushchin wrote: > > > > On Mon, Sep 25, 2017 at 10:25:21PM +0200, Michal Hocko

Re: [v8 0/4] cgroup-aware OOM killer

2017-09-25 Thread Johannes Weiner
On Mon, Sep 25, 2017 at 02:24:00PM +0200, Michal Hocko wrote: > I would really appreciate some feedback from Tejun, Johannes here. > > On Wed 20-09-17 14:53:41, Roman Gushchin wrote: > > On Mon, Sep 18, 2017 at 08:14:05AM +0200, Michal Hocko wrote: > > > On Fri 15-09-17 08:23:01, Roman Gushchin

Re: [v8 0/4] cgroup-aware OOM killer

2017-09-21 Thread Johannes Weiner
On Thu, Sep 21, 2017 at 02:17:25PM -0700, David Rientjes wrote: > On Thu, 21 Sep 2017, Johannes Weiner wrote: > > > That's a ridiculous nak. > > > > The fact that this patch series doesn't solve your particular problem > > is not a technical argument to *reject*

Re: [v8 0/4] cgroup-aware OOM killer

2017-09-21 Thread Johannes Weiner
On Mon, Sep 11, 2017 at 01:44:39PM -0700, David Rientjes wrote: > On Mon, 11 Sep 2017, Roman Gushchin wrote: > > > This patchset makes the OOM killer cgroup-aware. > > > > v8: > > - Do not kill tasks with OOM_SCORE_ADJ -1000 > > - Make the whole thing opt-in with cgroup mount option control

Re: [v7 5/5] mm, oom: cgroup v2 mount option to disable cgroup-aware OOM killer

2017-09-07 Thread Johannes Weiner
On Wed, Sep 06, 2017 at 10:28:59AM +0200, Michal Hocko wrote: > On Tue 05-09-17 17:53:44, Johannes Weiner wrote: > > The cgroup-awareness in the OOM killer is exactly the same thing. It > > should have been the default from the beginning, because the user > > config

Re: [v7 5/5] mm, oom: cgroup v2 mount option to disable cgroup-aware OOM killer

2017-09-05 Thread Johannes Weiner
On Tue, Sep 05, 2017 at 03:44:12PM +0200, Michal Hocko wrote: > Why is this an opt out rather than opt-in? IMHO the original oom logic > should be preserved by default and specific workloads should opt in for > the cgroup aware logic. Changing the global behavior depending on > whether cgroup v2

Re: [v5 2/4] mm, oom: cgroup-aware OOM killer

2017-08-23 Thread Johannes Weiner
Hi, On Wed, Aug 23, 2017 at 05:20:31PM +0100, Roman Gushchin wrote: > On Tue, Aug 22, 2017 at 01:03:44PM -0400, Johannes Weiner wrote: > > > + css_task_iter_start(>css, 0, ); > > > + while ((task = css_task_iter_next())) { > > > + /* > > > +

Re: [v5 1/4] mm, oom: refactor the oom_kill_process() function

2017-08-22 Thread Johannes Weiner
On Mon, Aug 14, 2017 at 07:32:09PM +0100, Roman Gushchin wrote: > @@ -817,67 +817,12 @@ static bool task_will_free_mem(struct task_struct *task) > return ret; > } > > -static void oom_kill_process(struct oom_control *oc, const char *message) > +static void __oom_kill_process(struct

Re: [v5 2/4] mm, oom: cgroup-aware OOM killer

2017-08-22 Thread Johannes Weiner
Hi Roman, great work! This looks mostly good to me now. Below are some nitpicks concerning naming and code layout, but nothing major. On Mon, Aug 14, 2017 at 07:32:11PM +0100, Roman Gushchin wrote: > @@ -39,6 +39,7 @@ struct oom_control { > unsigned long totalpages; > struct

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-31 Thread Johannes Weiner
On Wed, May 31, 2017 at 06:25:04PM +0200, Michal Hocko wrote: > On Thu 25-05-17 13:08:05, Johannes Weiner wrote: > > Everything the user would want to dynamically program in the kernel, > > say with bpf, they could do in userspace and then update the scores > > for each group

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-25 Thread Johannes Weiner
On Thu, May 25, 2017 at 05:38:19PM +0200, Michal Hocko wrote: > On Tue 23-05-17 09:25:44, Johannes Weiner wrote: > > On Tue, May 23, 2017 at 09:07:47AM +0200, Michal Hocko wrote: > > > On Mon 22-05-17 18:01:16, Roman Gushchin wrote: > [...] > > > > How to react o

Re: [PATCH] mm: per-cgroup memory reclaim stats

2017-05-24 Thread Johannes Weiner
ce of cgroup v2. > > The meaning of each value is the same as for global counters, > available using /proc/vmstat. > > Also, for consistency, rename mem_cgroup_count_vm_event() to > count_memcg_event_mm(). > > Signed-off-by: Roman Gushchin <g...@fb.com> > Suggested-by: Joh

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-23 Thread Johannes Weiner
On Tue, May 23, 2017 at 09:07:47AM +0200, Michal Hocko wrote: > On Mon 22-05-17 18:01:16, Roman Gushchin wrote: > > On Sat, May 20, 2017 at 09:37:29PM +0300, Vladimir Davydov wrote: > > > On Thu, May 18, 2017 at 05:28:04PM +0100, Roman Gushchin wrote: > > > ... > > > > +5-2-4. Cgroup-aware OOM

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Johannes Weiner
On Fri, May 19, 2017 at 04:37:27AM +1000, Balbir Singh wrote: > On Fri, May 19, 2017 at 3:30 AM, Michal Hocko wrote: > > On Thu 18-05-17 17:28:04, Roman Gushchin wrote: > >> Traditionally, the OOM killer is operating on a process level. > >> Under oom conditions, it finds a

Re: [PATCH] mm, docs: update memory.stat description with workingset* entries

2017-05-15 Thread Johannes Weiner
- workingset_activate, > - workingset_nodereclaim. > > This commit adds a corresponding description to the cgroup v2 docs. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Johannes Weiner <han...@cmpxchg.org> > Cc: Michal Hocko <mho...@kernel.org> > Cc: Vladimir Davy

Re: [PATCH] mm: per-cgroup memory reclaim stats

2017-05-12 Thread Johannes Weiner
On Fri, May 12, 2017 at 12:25:22PM +1000, Balbir Singh wrote: > On Thu, 2017-05-11 at 20:16 +0100, Roman Gushchin wrote: > > The meaning of each value is the same as for global counters, > > available using /proc/vmstat. > > > > Also, for consistency, rename mem_cgroup_count_vm_event() to > >

Re: [PATCH] Documentation: add watermark_scale_factor to the list of vm systcl file

2016-07-12 Thread Johannes Weiner
proc/sys/vm. Let's fix that. > > Signed-off-by: Jerome Marchand <jmarc...@redhat.com> Thanks Jerome! Acked-by: Johannes Weiner <han...@cmpxchg.org> -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.

Re: [PATCH] mm: vmpressure: make vmpressure_window a tunable.

2016-02-04 Thread Johannes Weiner
On Thu, Feb 04, 2016 at 12:18:34PM +0100, Martijn Coenen wrote: > I like this idea; I'm happy to come up with a window size and scaling > factors that we think works well, and get your feedback on that. My > only concern again would be that what works well for us may not work > well for others.

Re: [PATCH] mm: vmpressure: make vmpressure_window a tunable.

2016-02-03 Thread Johannes Weiner
On Wed, Feb 03, 2016 at 11:06:20AM +0100, Martijn Coenen wrote: > The window size used for calculating vm pressure > events was previously fixed at 512 pages. The > window size has a big impact on the rate of notifications > sent off to userspace, in particular when using the > "low" level. On