Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-16 Thread Michal Hocko
On Tue 16-10-18 20:05:47, Tetsuo Handa wrote: > On 2018/10/16 18:20, Michal Hocko wrote: > >> Anyway, I'm OK if we apply _BOTH_ your patch and my patch. Or I'm OK with > >> simplified > >> one shown below (because you don't like per memcg limit). > > > > My patch is adding a rate-limit! I really

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-16 Thread Michal Hocko
On Tue 16-10-18 20:05:47, Tetsuo Handa wrote: > On 2018/10/16 18:20, Michal Hocko wrote: > >> Anyway, I'm OK if we apply _BOTH_ your patch and my patch. Or I'm OK with > >> simplified > >> one shown below (because you don't like per memcg limit). > > > > My patch is adding a rate-limit! I really

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-16 Thread Tetsuo Handa
On 2018/10/16 18:20, Michal Hocko wrote: >> Anyway, I'm OK if we apply _BOTH_ your patch and my patch. Or I'm OK with >> simplified >> one shown below (because you don't like per memcg limit). > > My patch is adding a rate-limit! I really fail to see why we need yet > another one on top of it.

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-16 Thread Tetsuo Handa
On 2018/10/16 18:20, Michal Hocko wrote: >> Anyway, I'm OK if we apply _BOTH_ your patch and my patch. Or I'm OK with >> simplified >> one shown below (because you don't like per memcg limit). > > My patch is adding a rate-limit! I really fail to see why we need yet > another one on top of it.

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-16 Thread Michal Hocko
On Tue 16-10-18 09:55:06, Tetsuo Handa wrote: > On 2018/10/15 22:35, Michal Hocko wrote: > >> Nobody can prove that it never kills some machine. This is just one > >> example result of > >> one example stress tried in my environment. Since I am secure programming > >> man from security > >>

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-16 Thread Michal Hocko
On Tue 16-10-18 09:55:06, Tetsuo Handa wrote: > On 2018/10/15 22:35, Michal Hocko wrote: > >> Nobody can prove that it never kills some machine. This is just one > >> example result of > >> one example stress tried in my environment. Since I am secure programming > >> man from security > >>

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Tetsuo Handa
On 2018/10/15 22:35, Michal Hocko wrote: >> Nobody can prove that it never kills some machine. This is just one example >> result of >> one example stress tried in my environment. Since I am secure programming >> man from security >> subsystem, I really hate your "Can you trigger it?"

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Tetsuo Handa
On 2018/10/15 22:35, Michal Hocko wrote: >> Nobody can prove that it never kills some machine. This is just one example >> result of >> one example stress tried in my environment. Since I am secure programming >> man from security >> subsystem, I really hate your "Can you trigger it?"

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Michal Hocko
On Mon 15-10-18 21:47:08, Tetsuo Handa wrote: > On 2018/10/15 20:24, Michal Hocko wrote: > > On Mon 15-10-18 19:57:35, Tetsuo Handa wrote: > >> On 2018/10/15 17:19, Michal Hocko wrote: > >>> As so many dozens of times before, I will point you to an incremental > >>> nature of changes we really

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Michal Hocko
On Mon 15-10-18 21:47:08, Tetsuo Handa wrote: > On 2018/10/15 20:24, Michal Hocko wrote: > > On Mon 15-10-18 19:57:35, Tetsuo Handa wrote: > >> On 2018/10/15 17:19, Michal Hocko wrote: > >>> As so many dozens of times before, I will point you to an incremental > >>> nature of changes we really

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Tetsuo Handa
On 2018/10/15 20:24, Michal Hocko wrote: > On Mon 15-10-18 19:57:35, Tetsuo Handa wrote: >> On 2018/10/15 17:19, Michal Hocko wrote: >>> As so many dozens of times before, I will point you to an incremental >>> nature of changes we really prefer in the mm land. We are also after a >>> simplicity

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Tetsuo Handa
On 2018/10/15 20:24, Michal Hocko wrote: > On Mon 15-10-18 19:57:35, Tetsuo Handa wrote: >> On 2018/10/15 17:19, Michal Hocko wrote: >>> As so many dozens of times before, I will point you to an incremental >>> nature of changes we really prefer in the mm land. We are also after a >>> simplicity

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Michal Hocko
On Mon 15-10-18 19:57:35, Tetsuo Handa wrote: > On 2018/10/15 17:19, Michal Hocko wrote: > > As so many dozens of times before, I will point you to an incremental > > nature of changes we really prefer in the mm land. We are also after a > > simplicity which your proposal lacks in many aspects.

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Michal Hocko
On Mon 15-10-18 19:57:35, Tetsuo Handa wrote: > On 2018/10/15 17:19, Michal Hocko wrote: > > As so many dozens of times before, I will point you to an incremental > > nature of changes we really prefer in the mm land. We are also after a > > simplicity which your proposal lacks in many aspects.

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Tetsuo Handa
On 2018/10/15 17:19, Michal Hocko wrote: > As so many dozens of times before, I will point you to an incremental > nature of changes we really prefer in the mm land. We are also after a > simplicity which your proposal lacks in many aspects. You seem to ignore > that general approach and I have

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Tetsuo Handa
On 2018/10/15 17:19, Michal Hocko wrote: > As so many dozens of times before, I will point you to an incremental > nature of changes we really prefer in the mm land. We are also after a > simplicity which your proposal lacks in many aspects. You seem to ignore > that general approach and I have

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Michal Hocko
On Sat 13-10-18 20:28:38, Tetsuo Handa wrote: > On 2018/10/13 20:22, Johannes Weiner wrote: > > On Sat, Oct 13, 2018 at 08:09:30PM +0900, Tetsuo Handa wrote: > >> -- Michal's patch -- > >> > >> 73133 lines (5.79MB) of kernel messages per one run > >> > >> [root@ccsecurity ~]# time

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-15 Thread Michal Hocko
On Sat 13-10-18 20:28:38, Tetsuo Handa wrote: > On 2018/10/13 20:22, Johannes Weiner wrote: > > On Sat, Oct 13, 2018 at 08:09:30PM +0900, Tetsuo Handa wrote: > >> -- Michal's patch -- > >> > >> 73133 lines (5.79MB) of kernel messages per one run > >> > >> [root@ccsecurity ~]# time

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-13 Thread Tetsuo Handa
On 2018/10/13 20:22, Johannes Weiner wrote: > On Sat, Oct 13, 2018 at 08:09:30PM +0900, Tetsuo Handa wrote: >> -- Michal's patch -- >> >> 73133 lines (5.79MB) of kernel messages per one run >> >> [root@ccsecurity ~]# time ./a.out >> >> real3m44.389s >> user0m0.000s >> sys

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-13 Thread Tetsuo Handa
On 2018/10/13 20:22, Johannes Weiner wrote: > On Sat, Oct 13, 2018 at 08:09:30PM +0900, Tetsuo Handa wrote: >> -- Michal's patch -- >> >> 73133 lines (5.79MB) of kernel messages per one run >> >> [root@ccsecurity ~]# time ./a.out >> >> real3m44.389s >> user0m0.000s >> sys

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-13 Thread Johannes Weiner
On Sat, Oct 13, 2018 at 08:09:30PM +0900, Tetsuo Handa wrote: > -- Michal's patch -- > > 73133 lines (5.79MB) of kernel messages per one run > > [root@ccsecurity ~]# time ./a.out > > real3m44.389s > user0m0.000s > sys 3m42.334s > > [root@ccsecurity ~]# time ./a.out

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-13 Thread Johannes Weiner
On Sat, Oct 13, 2018 at 08:09:30PM +0900, Tetsuo Handa wrote: > -- Michal's patch -- > > 73133 lines (5.79MB) of kernel messages per one run > > [root@ccsecurity ~]# time ./a.out > > real3m44.389s > user0m0.000s > sys 3m42.334s > > [root@ccsecurity ~]# time ./a.out

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-13 Thread Tetsuo Handa
On 2018/10/12 21:58, Tetsuo Handa wrote: > On 2018/10/12 21:41, Johannes Weiner wrote: >> On Fri, Oct 12, 2018 at 09:10:40PM +0900, Tetsuo Handa wrote: >>> On 2018/10/12 21:08, Michal Hocko wrote: > So not more than 10 dumps in each 5s interval. That looks reasonable > to me. By the time

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-13 Thread Tetsuo Handa
On 2018/10/12 21:58, Tetsuo Handa wrote: > On 2018/10/12 21:41, Johannes Weiner wrote: >> On Fri, Oct 12, 2018 at 09:10:40PM +0900, Tetsuo Handa wrote: >>> On 2018/10/12 21:08, Michal Hocko wrote: > So not more than 10 dumps in each 5s interval. That looks reasonable > to me. By the time

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Tetsuo Handa
Calling printk() people. ;-) On 2018/10/12 21:41, Johannes Weiner wrote: > On Fri, Oct 12, 2018 at 09:10:40PM +0900, Tetsuo Handa wrote: >> On 2018/10/12 21:08, Michal Hocko wrote: So not more than 10 dumps in each 5s interval. That looks reasonable to me. By the time it starts dropping

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Tetsuo Handa
Calling printk() people. ;-) On 2018/10/12 21:41, Johannes Weiner wrote: > On Fri, Oct 12, 2018 at 09:10:40PM +0900, Tetsuo Handa wrote: >> On 2018/10/12 21:08, Michal Hocko wrote: So not more than 10 dumps in each 5s interval. That looks reasonable to me. By the time it starts dropping

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Johannes Weiner
On Fri, Oct 12, 2018 at 09:10:40PM +0900, Tetsuo Handa wrote: > On 2018/10/12 21:08, Michal Hocko wrote: > >> So not more than 10 dumps in each 5s interval. That looks reasonable > >> to me. By the time it starts dropping data you have more than enough > >> information to go on already. > > > >

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Johannes Weiner
On Fri, Oct 12, 2018 at 09:10:40PM +0900, Tetsuo Handa wrote: > On 2018/10/12 21:08, Michal Hocko wrote: > >> So not more than 10 dumps in each 5s interval. That looks reasonable > >> to me. By the time it starts dropping data you have more than enough > >> information to go on already. > > > >

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Tetsuo Handa
On 2018/10/12 21:08, Michal Hocko wrote: >> So not more than 10 dumps in each 5s interval. That looks reasonable >> to me. By the time it starts dropping data you have more than enough >> information to go on already. > > Yeah. Unless we have a storm coming from many different cgroups in >

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Tetsuo Handa
On 2018/10/12 21:08, Michal Hocko wrote: >> So not more than 10 dumps in each 5s interval. That looks reasonable >> to me. By the time it starts dropping data you have more than enough >> information to go on already. > > Yeah. Unless we have a storm coming from many different cgroups in >

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Michal Hocko
On Fri 12-10-18 07:20:08, Johannes Weiner wrote: > On Wed, Oct 10, 2018 at 05:11:35PM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > syzbot has noticed that it can trigger RCU stalls from the memcg oom > > path: > > RIP: 0010:dump_stack+0x358/0x3ab lib/dump_stack.c:118 > > Code: 74 0c

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Michal Hocko
On Fri 12-10-18 07:20:08, Johannes Weiner wrote: > On Wed, Oct 10, 2018 at 05:11:35PM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > syzbot has noticed that it can trigger RCU stalls from the memcg oom > > path: > > RIP: 0010:dump_stack+0x358/0x3ab lib/dump_stack.c:118 > > Code: 74 0c

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Johannes Weiner
On Wed, Oct 10, 2018 at 05:11:35PM +0200, Michal Hocko wrote: > From: Michal Hocko > > syzbot has noticed that it can trigger RCU stalls from the memcg oom > path: > RIP: 0010:dump_stack+0x358/0x3ab lib/dump_stack.c:118 > Code: 74 0c 48 c7 c7 f0 f5 31 89 e8 9f 0e 0e fa 48 83 3d 07 15 7d 01 00 0f

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Johannes Weiner
On Wed, Oct 10, 2018 at 05:11:35PM +0200, Michal Hocko wrote: > From: Michal Hocko > > syzbot has noticed that it can trigger RCU stalls from the memcg oom > path: > RIP: 0010:dump_stack+0x358/0x3ab lib/dump_stack.c:118 > Code: 74 0c 48 c7 c7 f0 f5 31 89 e8 9f 0e 0e fa 48 83 3d 07 15 7d 01 00 0f

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Tetsuo Handa
On 2018/10/11 15:37, Tetsuo Handa wrote: > Michal Hocko wrote: >> Once we are here, make sure that the reason to trigger the OOM is >> printed without ratelimiting because this is really valuable to >> debug what happened. > > Here is my version. > Hmm, per mem_cgroup flag would be better than

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-12 Thread Tetsuo Handa
On 2018/10/11 15:37, Tetsuo Handa wrote: > Michal Hocko wrote: >> Once we are here, make sure that the reason to trigger the OOM is >> printed without ratelimiting because this is really valuable to >> debug what happened. > > Here is my version. > Hmm, per mem_cgroup flag would be better than

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-11 Thread Tetsuo Handa
Michal Hocko wrote: > Once we are here, make sure that the reason to trigger the OOM is > printed without ratelimiting because this is really valuable to > debug what happened. Here is my version. >From 0c9ab34fd01837d4c85794042ecb9e922c9eed5a Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date:

Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks

2018-10-11 Thread Tetsuo Handa
Michal Hocko wrote: > Once we are here, make sure that the reason to trigger the OOM is > printed without ratelimiting because this is really valuable to > debug what happened. Here is my version. >From 0c9ab34fd01837d4c85794042ecb9e922c9eed5a Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: