From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id DB0866B0006 for ; Thu, 31 May 2018 02:56:48 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id f10-v6so12765763pln.21 for ; Wed, 30 May 2018 23:56:48 -0700 (PDT) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id d24-v6si36600637plr.302.2018.05.30.23.56.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 30 May 2018 23:56:47 -0700 (PDT) Date: Thu, 31 May 2018 08:56:42 +0200 From: Michal Hocko Subject: Re: [PATCH] memcg: force charge kmem counter too Message-ID: <20180531065642.GI15278@dhcp22.suse.cz> References: <20180525185501.82098-1-shakeelb@google.com> <20180526185144.xvh7ejlyelzvqwdb@esperanza> <20180528091110.GG1517@dhcp22.suse.cz> <20180529083153.GR27180@dhcp22.suse.cz> <20180531060133.GA31477@rodete-desktop-imager.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531060133.GA31477@rodete-desktop-imager.corp.google.com> Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: Shakeel Butt , Vladimir Davydov , Andrew Morton , Greg Thelen , Johannes Weiner , Linux MM , Cgroups , LKML 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 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 keep saying that kmem accounting in v1 is hard usable and > > > strongly discourage people from using it. Sure we can add the code which > > > handles _this_ particular case but that wouldn't make the whole thing > > > more usable I strongly suspect. Maybe I am wrong and you can provide > > > some specific examples. Is GFP_NOFAIL that common to matter? > > > > > > In any case we should balance between the code maintainability here. > > > Adding more cruft into the allocator path is not free. > > > > > > > We do not use kmem limits internally and this is something I found > > through code inspection. If this patch is increasing the cost of code > > maintainability I am fine with dropping it but at least there should a > > comment saying that kmem limits are broken and no need fix. > > I agree. > > Even, I didn't know kmem is strongly discouraged until now. Then, > why is it enabled by default on cgroup v1? You have to set a non-zero limit to make it active IIRC. The code is compiled in because v2 enables it by default. > Let's turn if off with comment "It's broken so do not use/fix. Instead, > please move to cgroup v2". -- Michal Hocko SUSE Labs