Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Michal Hocko
On Thu 31-05-18 17:23:17, Minchan Kim wrote: > On Thu, May 31, 2018 at 08:56:42AM +0200, Michal Hocko wrote: > > On Thu 31-05-18 15:01:33, Minchan Kim wrote: > > > On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > > > > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > > > >

Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Michal Hocko
On Thu 31-05-18 17:23:17, Minchan Kim wrote: > On Thu, May 31, 2018 at 08:56:42AM +0200, Michal Hocko wrote: > > On Thu 31-05-18 15:01:33, Minchan Kim wrote: > > > On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > > > > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > > > >

Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Minchan Kim
On Thu, May 31, 2018 at 08:56:42AM +0200, Michal Hocko wrote: > On Thu 31-05-18 15:01:33, Minchan Kim wrote: > > On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > > > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > > > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > > > >>

Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Minchan Kim
On Thu, May 31, 2018 at 08:56:42AM +0200, Michal Hocko wrote: > On Thu 31-05-18 15:01:33, Minchan Kim wrote: > > On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > > > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > > > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > > > >>

Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Michal Hocko
On Thu 31-05-18 15:01:33, Minchan Kim wrote: > On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > > >> On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > > >> Though is

Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Michal Hocko
On Thu 31-05-18 15:01:33, Minchan Kim wrote: > On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > > >> On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > > >> Though is

Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Minchan Kim
On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > >> On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > >> Though is there a precedence where the broken feature is not fixed

Re: [PATCH] memcg: force charge kmem counter too

2018-05-31 Thread Minchan Kim
On Wed, May 30, 2018 at 11:14:33AM -0700, Shakeel Butt wrote: > On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > >> On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > >> Though is there a precedence where the broken feature is not fixed

Re: [PATCH] memcg: force charge kmem counter too

2018-05-30 Thread Shakeel Butt
On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: >> On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: >> Though is there a precedence where the broken feature is not fixed >> because an alternative is available? > > Well, I can see how

Re: [PATCH] memcg: force charge kmem counter too

2018-05-30 Thread Shakeel Butt
On Tue, May 29, 2018 at 1:31 AM, Michal Hocko wrote: > On Mon 28-05-18 10:23:07, Shakeel Butt wrote: >> On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: >> Though is there a precedence where the broken feature is not fixed >> because an alternative is available? > > Well, I can see how

Re: [PATCH] memcg: force charge kmem counter too

2018-05-29 Thread Michal Hocko
On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > Though is there a precedence where the broken feature is not fixed > because an alternative is available? Well, I can see how breaking GFP_NOFAIL semantic is problematic, on the other hand we

Re: [PATCH] memcg: force charge kmem counter too

2018-05-29 Thread Michal Hocko
On Mon 28-05-18 10:23:07, Shakeel Butt wrote: > On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > Though is there a precedence where the broken feature is not fixed > because an alternative is available? Well, I can see how breaking GFP_NOFAIL semantic is problematic, on the other hand we

Re: [PATCH] memcg: force charge kmem counter too

2018-05-28 Thread Shakeel Butt
On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > On Sat 26-05-18 15:37:05, Shakeel Butt wrote: >> On Sat, May 26, 2018 at 11:51 AM, Vladimir Davydov >> wrote: >> > On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: >> >> Based on several conditions the kernel can decide to force

Re: [PATCH] memcg: force charge kmem counter too

2018-05-28 Thread Shakeel Butt
On Mon, May 28, 2018 at 2:11 AM, Michal Hocko wrote: > On Sat 26-05-18 15:37:05, Shakeel Butt wrote: >> On Sat, May 26, 2018 at 11:51 AM, Vladimir Davydov >> wrote: >> > On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: >> >> Based on several conditions the kernel can decide to force

Re: [PATCH] memcg: force charge kmem counter too

2018-05-28 Thread Michal Hocko
On Sat 26-05-18 15:37:05, Shakeel Butt wrote: > On Sat, May 26, 2018 at 11:51 AM, Vladimir Davydov > wrote: > > On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: > >> Based on several conditions the kernel can decide to force charge an > >> allocation for a

Re: [PATCH] memcg: force charge kmem counter too

2018-05-28 Thread Michal Hocko
On Sat 26-05-18 15:37:05, Shakeel Butt wrote: > On Sat, May 26, 2018 at 11:51 AM, Vladimir Davydov > wrote: > > On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: > >> Based on several conditions the kernel can decide to force charge an > >> allocation for a memcg i.e. overcharge

Re: [PATCH] memcg: force charge kmem counter too

2018-05-26 Thread Shakeel Butt
On Sat, May 26, 2018 at 11:51 AM, Vladimir Davydov wrote: > On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: >> Based on several conditions the kernel can decide to force charge an >> allocation for a memcg i.e. overcharge memcg->memory and memcg->memsw >>

Re: [PATCH] memcg: force charge kmem counter too

2018-05-26 Thread Shakeel Butt
On Sat, May 26, 2018 at 11:51 AM, Vladimir Davydov wrote: > On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: >> Based on several conditions the kernel can decide to force charge an >> allocation for a memcg i.e. overcharge memcg->memory and memcg->memsw >> counters. Do the same for

Re: [PATCH] memcg: force charge kmem counter too

2018-05-26 Thread Vladimir Davydov
On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: > Based on several conditions the kernel can decide to force charge an > allocation for a memcg i.e. overcharge memcg->memory and memcg->memsw > counters. Do the same for memcg->kmem counter too. In cgroup-v1, this > bug can cause a

Re: [PATCH] memcg: force charge kmem counter too

2018-05-26 Thread Vladimir Davydov
On Fri, May 25, 2018 at 11:55:01AM -0700, Shakeel Butt wrote: > Based on several conditions the kernel can decide to force charge an > allocation for a memcg i.e. overcharge memcg->memory and memcg->memsw > counters. Do the same for memcg->kmem counter too. In cgroup-v1, this > bug can cause a

[PATCH] memcg: force charge kmem counter too

2018-05-25 Thread Shakeel Butt
Based on several conditions the kernel can decide to force charge an allocation for a memcg i.e. overcharge memcg->memory and memcg->memsw counters. Do the same for memcg->kmem counter too. In cgroup-v1, this bug can cause a __GFP_NOFAIL kmem allocation fail if an explicit limit on kmem counter is

[PATCH] memcg: force charge kmem counter too

2018-05-25 Thread Shakeel Butt
Based on several conditions the kernel can decide to force charge an allocation for a memcg i.e. overcharge memcg->memory and memcg->memsw counters. Do the same for memcg->kmem counter too. In cgroup-v1, this bug can cause a __GFP_NOFAIL kmem allocation fail if an explicit limit on kmem counter is