Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread KOSAKI Motohiro
>> I think this only correct when memcg. Even if swappiness==0, global reclaim >> swap >> out anon pages before oom. > > Right you are (we really do swap when the file pages are really > low)! Sorry about the confusion. I kind of became if(global_reclaim) > block blind... > > Then this really

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Michal Hocko
On Mon 15-10-12 10:25:14, KOSAKI Motohiro wrote: > > diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt > > index 078701f..308fd77 100644 > > --- a/Documentation/sysctl/vm.txt > > +++ b/Documentation/sysctl/vm.txt > > @@ -640,6 +640,9 @@ swappiness > > This control is used to

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread KOSAKI Motohiro
> diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt > index 078701f..308fd77 100644 > --- a/Documentation/sysctl/vm.txt > +++ b/Documentation/sysctl/vm.txt > @@ -640,6 +640,9 @@ swappiness > This control is used to define how aggressive the kernel will swap > memory pages.

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Michal Hocko
On Mon 15-10-12 18:11:24, KAMEZAWA Hiroyuki wrote: > (2012/10/10 23:11), Michal Hocko wrote: [...] > > From 445c2ced957cd77cbfca44d0e3f5056fed252a34 Mon Sep 17 00:00:00 2001 > >From: Michal Hocko > >Date: Wed, 10 Oct 2012 15:46:54 +0200 > >Subject: [PATCH] memcg: oom: fix totalpages calculation

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Kamezawa Hiroyuki
(2012/10/10 23:11), Michal Hocko wrote: Hi, I am sending the patch below as an RFC because I am not entirely happy about myself and maybe somebody can come up with a different approach which would be less hackish. As a background, I have noticed that memcg OOM killer kills a wrong tasks while

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Kamezawa Hiroyuki
(2012/10/10 23:11), Michal Hocko wrote: Hi, I am sending the patch below as an RFC because I am not entirely happy about myself and maybe somebody can come up with a different approach which would be less hackish. As a background, I have noticed that memcg OOM killer kills a wrong tasks while

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Michal Hocko
On Mon 15-10-12 18:11:24, KAMEZAWA Hiroyuki wrote: (2012/10/10 23:11), Michal Hocko wrote: [...] From 445c2ced957cd77cbfca44d0e3f5056fed252a34 Mon Sep 17 00:00:00 2001 From: Michal Hocko mho...@suse.cz Date: Wed, 10 Oct 2012 15:46:54 +0200 Subject: [PATCH] memcg: oom: fix totalpages

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread KOSAKI Motohiro
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 078701f..308fd77 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt @@ -640,6 +640,9 @@ swappiness This control is used to define how aggressive the kernel will swap memory pages. Higher

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Michal Hocko
On Mon 15-10-12 10:25:14, KOSAKI Motohiro wrote: diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 078701f..308fd77 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt @@ -640,6 +640,9 @@ swappiness This control is used to define how

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread KOSAKI Motohiro
I think this only correct when memcg. Even if swappiness==0, global reclaim swap out anon pages before oom. Right you are (we really do swap when the file pages are really low)! Sorry about the confusion. I kind of became if(global_reclaim) block blind... Then this really needs a memcg

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-11 Thread Michal Hocko
On Wed 10-10-12 13:50:21, David Rientjes wrote: > On Wed, 10 Oct 2012, Michal Hocko wrote: > > > Hi, > > I am sending the patch below as an RFC because I am not entirely happy > > about myself and maybe somebody can come up with a different approach > > which would be less hackish. > > I don't

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-11 Thread Michal Hocko
On Wed 10-10-12 13:50:21, David Rientjes wrote: On Wed, 10 Oct 2012, Michal Hocko wrote: Hi, I am sending the patch below as an RFC because I am not entirely happy about myself and maybe somebody can come up with a different approach which would be less hackish. I don't see this as

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-10 Thread David Rientjes
On Wed, 10 Oct 2012, Michal Hocko wrote: > Hi, > I am sending the patch below as an RFC because I am not entirely happy > about myself and maybe somebody can come up with a different approach > which would be less hackish. I don't see this as hackish, if memory.swappiness limits access to swap

[RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-10 Thread Michal Hocko
Hi, I am sending the patch below as an RFC because I am not entirely happy about myself and maybe somebody can come up with a different approach which would be less hackish. As a background, I have noticed that memcg OOM killer kills a wrong tasks while playing with memory.swappiness==0 in a small

[RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-10 Thread Michal Hocko
Hi, I am sending the patch below as an RFC because I am not entirely happy about myself and maybe somebody can come up with a different approach which would be less hackish. As a background, I have noticed that memcg OOM killer kills a wrong tasks while playing with memory.swappiness==0 in a small

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-10 Thread David Rientjes
On Wed, 10 Oct 2012, Michal Hocko wrote: Hi, I am sending the patch below as an RFC because I am not entirely happy about myself and maybe somebody can come up with a different approach which would be less hackish. I don't see this as hackish, if memory.swappiness limits access to swap then