Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-11 Thread Zhaoyang Huang
On Wed, Apr 11, 2018 at 2:39 AM, Joel Fernandes wrote: > Hi Steve, > > On Tue, Apr 10, 2018 at 11:00 AM, Steven Rostedt wrote: >> On Tue, 10 Apr 2018 09:45:54 -0700 >> Joel Fernandes wrote: >> >>> > diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h >>> > index a0233edc0718..

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Steven Rostedt
On Tue, 10 Apr 2018 11:39:24 -0700 Joel Fernandes wrote: > Yes I agree. So lets just do that and no other patches additional > patches are needed then. Let me know if there's anything else I > missed? Yeah, I think there's really no other issue. I'm not going to apply more patches. > > Also I

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Joel Fernandes
Hi Steve, On Tue, Apr 10, 2018 at 11:00 AM, Steven Rostedt wrote: > On Tue, 10 Apr 2018 09:45:54 -0700 > Joel Fernandes wrote: > >> > diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h >> > index a0233edc0718..807e2bcb21b3 100644 >> > --- a/include/linux/ring_buffer.h >> > ++

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Steven Rostedt
On Tue, 10 Apr 2018 09:45:54 -0700 Joel Fernandes wrote: > > diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h > > index a0233edc0718..807e2bcb21b3 100644 > > --- a/include/linux/ring_buffer.h > > +++ b/include/linux/ring_buffer.h > > @@ -106,7 +106,8 @@ __poll_t ring_buffer_

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Joel Fernandes
Hi Steve, On Tue, Apr 10, 2018 at 6:13 AM, Steven Rostedt wrote: > On Tue, 10 Apr 2018 08:36:25 -0400 > Steven Rostedt wrote: > >> On Tue, 10 Apr 2018 14:27:06 +0200 >> Michal Hocko wrote: >> >> > I would rather that the code outside of MM not touch implementation >> > details like OOM_SCORE_AD

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Steven Rostedt
On Tue, 10 Apr 2018 09:13:11 -0400 Steven Rostedt wrote: > Something like this: Zhaoyang, would this work for you? Then all you need to do is to: echo 0 > /d/tracing/options/mem-reclaim and then you have the old behavior before Joel's patch. It will use NORETRY and also not set up the OOM to

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Steven Rostedt
On Tue, 10 Apr 2018 08:36:25 -0400 Steven Rostedt wrote: > On Tue, 10 Apr 2018 14:27:06 +0200 > Michal Hocko wrote: > > > I would rather that the code outside of MM not touch implementation > > details like OOM_SCORE_ADJ_MIN. It is really hard to get rid of abusers > > whenever you try to chang

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Steven Rostedt
On Tue, 10 Apr 2018 14:27:06 +0200 Michal Hocko wrote: > I would rather that the code outside of MM not touch implementation > details like OOM_SCORE_ADJ_MIN. It is really hard to get rid of abusers > whenever you try to change something in MM then. Especially when the > usecase is quite dubious.

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Michal Hocko
On Tue 10-04-18 08:23:16, Steven Rostedt wrote: > On Tue, 10 Apr 2018 12:49:02 +0200 > Michal Hocko wrote: > > > But you do realize that what you are proposing is by no means any safer, > > don't you? The memory allocated for the ring buffer is _not_ accounted > > to any process and as such it is

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Steven Rostedt
On Tue, 10 Apr 2018 12:49:02 +0200 Michal Hocko wrote: > But you do realize that what you are proposing is by no means any safer, > don't you? The memory allocated for the ring buffer is _not_ accounted > to any process and as such it is not considered by the oom killer when > picking up an oom v

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Michal Hocko
On Tue 10-04-18 17:32:44, Zhaoyang Huang wrote: > On Tue, Apr 10, 2018 at 5:01 PM, Michal Hocko wrote: > > On Tue 10-04-18 16:38:32, Zhaoyang Huang wrote: > >> On Tue, Apr 10, 2018 at 4:12 PM, Michal Hocko wrote: > >> > On Tue 10-04-18 16:04:40, Zhaoyang Huang wrote: > >> >> On Tue, Apr 10, 2018

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Zhaoyang Huang
On Tue, Apr 10, 2018 at 5:32 PM, Zhaoyang Huang wrote: > On Tue, Apr 10, 2018 at 5:01 PM, Michal Hocko wrote: >> On Tue 10-04-18 16:38:32, Zhaoyang Huang wrote: >>> On Tue, Apr 10, 2018 at 4:12 PM, Michal Hocko wrote: >>> > On Tue 10-04-18 16:04:40, Zhaoyang Huang wrote: >>> >> On Tue, Apr 10, 2

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Zhaoyang Huang
On Tue, Apr 10, 2018 at 5:01 PM, Michal Hocko wrote: > On Tue 10-04-18 16:38:32, Zhaoyang Huang wrote: >> On Tue, Apr 10, 2018 at 4:12 PM, Michal Hocko wrote: >> > On Tue 10-04-18 16:04:40, Zhaoyang Huang wrote: >> >> On Tue, Apr 10, 2018 at 3:49 PM, Michal Hocko wrote: >> >> > On Tue 10-04-18 1

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Michal Hocko
On Tue 10-04-18 16:38:32, Zhaoyang Huang wrote: > On Tue, Apr 10, 2018 at 4:12 PM, Michal Hocko wrote: > > On Tue 10-04-18 16:04:40, Zhaoyang Huang wrote: > >> On Tue, Apr 10, 2018 at 3:49 PM, Michal Hocko wrote: > >> > On Tue 10-04-18 14:39:35, Zhaoyang Huang wrote: > >> >> On Tue, Apr 10, 2018

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Zhaoyang Huang
On Tue, Apr 10, 2018 at 4:12 PM, Michal Hocko wrote: > On Tue 10-04-18 16:04:40, Zhaoyang Huang wrote: >> On Tue, Apr 10, 2018 at 3:49 PM, Michal Hocko wrote: >> > On Tue 10-04-18 14:39:35, Zhaoyang Huang wrote: >> >> On Tue, Apr 10, 2018 at 2:14 PM, Michal Hocko wrote: > [...] >> >> > OOM_SCORE

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Michal Hocko
On Tue 10-04-18 16:04:40, Zhaoyang Huang wrote: > On Tue, Apr 10, 2018 at 3:49 PM, Michal Hocko wrote: > > On Tue 10-04-18 14:39:35, Zhaoyang Huang wrote: > >> On Tue, Apr 10, 2018 at 2:14 PM, Michal Hocko wrote: [...] > >> > OOM_SCORE_ADJ_MIN means "hide the process from the OOM killer > >> > c

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Zhaoyang Huang
On Tue, Apr 10, 2018 at 3:49 PM, Michal Hocko wrote: > On Tue 10-04-18 14:39:35, Zhaoyang Huang wrote: >> On Tue, Apr 10, 2018 at 2:14 PM, Michal Hocko wrote: >> > On Tue 10-04-18 11:41:44, Zhaoyang Huang wrote: >> >> On Tue, Apr 10, 2018 at 11:12 AM, Steven Rostedt >> >> wrote: >> >> > On Tue,

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-10 Thread Michal Hocko
On Tue 10-04-18 14:39:35, Zhaoyang Huang wrote: > On Tue, Apr 10, 2018 at 2:14 PM, Michal Hocko wrote: > > On Tue 10-04-18 11:41:44, Zhaoyang Huang wrote: > >> On Tue, Apr 10, 2018 at 11:12 AM, Steven Rostedt > >> wrote: > >> > On Tue, 10 Apr 2018 10:32:36 +0800 > >> > Zhaoyang Huang wrote: > >

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-09 Thread Zhaoyang Huang
On Tue, Apr 10, 2018 at 2:14 PM, Michal Hocko wrote: > On Tue 10-04-18 11:41:44, Zhaoyang Huang wrote: >> On Tue, Apr 10, 2018 at 11:12 AM, Steven Rostedt wrote: >> > On Tue, 10 Apr 2018 10:32:36 +0800 >> > Zhaoyang Huang wrote: >> > >> >> For bellowing scenario, process A have no intension to e

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-09 Thread Michal Hocko
On Tue 10-04-18 11:41:44, Zhaoyang Huang wrote: > On Tue, Apr 10, 2018 at 11:12 AM, Steven Rostedt wrote: > > On Tue, 10 Apr 2018 10:32:36 +0800 > > Zhaoyang Huang wrote: > > > >> For bellowing scenario, process A have no intension to exhaust the > >> memory, but will be likely to be selected by

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-09 Thread Zhaoyang Huang
On Tue, Apr 10, 2018 at 11:12 AM, Steven Rostedt wrote: > On Tue, 10 Apr 2018 10:32:36 +0800 > Zhaoyang Huang wrote: > >> For bellowing scenario, process A have no intension to exhaust the >> memory, but will be likely to be selected by OOM for we set >> OOM_CORE_ADJ_MIN for it. >> process A(-100

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-09 Thread Steven Rostedt
On Tue, 10 Apr 2018 10:32:36 +0800 Zhaoyang Huang wrote: > For bellowing scenario, process A have no intension to exhaust the > memory, but will be likely to be selected by OOM for we set > OOM_CORE_ADJ_MIN for it. > process A(-1000) process B > > i = s

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-09 Thread Zhaoyang Huang
On Tue, Apr 10, 2018 at 8:32 AM, Zhaoyang Huang wrote: > On Mon, Apr 9, 2018 at 9:49 PM, Steven Rostedt wrote: >> On Mon, 9 Apr 2018 08:56:01 +0800 >> Zhaoyang Huang wrote: >> >>> >> >>> >> if (oom_task_origin(task)) { >>> >> points = ULONG_MAX; >>> >> got

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-09 Thread Zhaoyang Huang
On Mon, Apr 9, 2018 at 9:49 PM, Steven Rostedt wrote: > On Mon, 9 Apr 2018 08:56:01 +0800 > Zhaoyang Huang wrote: > >> >> >> >> if (oom_task_origin(task)) { >> >> points = ULONG_MAX; >> >> goto select; >> >> } >> >> >> >> points = oom_badnes

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-09 Thread Steven Rostedt
On Mon, 9 Apr 2018 08:56:01 +0800 Zhaoyang Huang wrote: > >> > >> if (oom_task_origin(task)) { > >> points = ULONG_MAX; > >> goto select; > >> } > >> > >> points = oom_badness(task, NULL, oc->nodemask, oc->totalpages); > >> if (!poin

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-08 Thread Zhaoyang Huang
On Sun, Apr 8, 2018 at 8:47 PM, Steven Rostedt wrote: > [ Removing kernel-patch-test, because of annoying "moderator" messages ] > > On Sun, 8 Apr 2018 13:54:59 +0800 > Zhaoyang Huang wrote: > >> On Sun, Apr 8, 2018 at 11:48 AM, Steven Rostedt wrote: >> > On Sun, 8 Apr 2018 10:16:23 +0800 >> >

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-08 Thread Steven Rostedt
On Sun, 8 Apr 2018 13:54:59 +0800 Zhaoyang Huang wrote: > On Sun, Apr 8, 2018 at 11:48 AM, Steven Rostedt wrote: > > On Sun, 8 Apr 2018 10:16:23 +0800 > > Zhaoyang Huang wrote: > > > >> Don't choose the process with adj == OOM_SCORE_ADJ_MIN which > >> over-allocating pages for ring buffers.

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-07 Thread Zhaoyang Huang
On Sun, Apr 8, 2018 at 11:48 AM, Steven Rostedt wrote: > On Sun, 8 Apr 2018 10:16:23 +0800 > Zhaoyang Huang wrote: > >> Don't choose the process with adj == OOM_SCORE_ADJ_MIN which >> over-allocating pages for ring buffers. > > Why? > > -- Steve because in oom_evaluate_task, the process with adj

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-07 Thread Steven Rostedt
On Sun, 8 Apr 2018 10:16:23 +0800 Zhaoyang Huang wrote: > Don't choose the process with adj == OOM_SCORE_ADJ_MIN which > over-allocating pages for ring buffers. Why? -- Steve