Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp291417imm; Wed, 30 May 2018 23:57:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZnW2tp4N9QfpE/TeBK0lo0y5BdEkHozrdneU8X4w3NLwRUSSK+p4KU2wUn09Gqgow3Bsq X-Received: by 2002:a63:2b46:: with SMTP id r67-v6mr4460276pgr.89.1527749857817; Wed, 30 May 2018 23:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527749857; cv=none; d=google.com; s=arc-20160816; b=aSDIZMAhyVsooFoxN3ZY5Tveo/ViWRG4DUMI6aVYi1N0lGhanR2vuqsAOMkKY9AEiw QZEnzNiue6o0aUiwlHfvS8OuqxsPY/cN2/C8pZRqktAJjddkbmgEDs8NxIBri/nMULWW Th4nnblY8mhAmABNFkXWgVm1gUSVSGY5PTp80GIeDMBdsUcIxqMSZR4mihzUl28EWWbL CHQVuMtv79tPMg+KJdAN3QIjLpGnv+arb0Sh+mCORxFeSNsp1CmZdHId+LuXhCLHtUmF wnuprRAYJy/JdqpcEU7GWHed3Cil30N9Pk5eokndGv/6EqtcMOCCiZmgRpoWiStijgy0 /VxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ZmZtRlcf1Apv/5C5FNCE08I7K4A6pUpiErolHDYsGLQ=; b=wt1UEz96KJYbH5tyEs/9PRL2QMJd0M8OkTLCb4VgR6rk0wicCtZGz1pnXeTbRkL0yb 3I6EO+KLlX4bzBvZxWz2KDRwOhTlTK3xeD0J0UyYuDBHbU/Vn4QVPPsUqwlYZwWvrvLv y2agB1H65bUUjo2cQZdpv68ZtFDeMamnyG7vrm0MHe7NFVf8Fx1sEEdcBFmxSQeZvnG5 CgRCkuQkYT5xz6i1uo429dDYRSb06L1k5SLZD9qZNmie94CjB5W4fiGGxi4vbgSHIOOT OHiRQYD7V4RahEb8o/pTBOuKc7rc+4E+bjONJouAOmWvcfuPf1HgZh8rf2Q4MWaj0dVL saQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k135-v6si18777922pgc.590.2018.05.30.23.57.23; Wed, 30 May 2018 23:57:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949AbeEaG4s (ORCPT + 99 others); Thu, 31 May 2018 02:56:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:51548 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753882AbeEaG4q (ORCPT ); Thu, 31 May 2018 02:56:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 70188AC79; Thu, 31 May 2018 06:56:44 +0000 (UTC) Date: Thu, 31 May 2018 08:56:42 +0200 From: Michal Hocko To: Minchan Kim Cc: Shakeel Butt , Vladimir Davydov , Andrew Morton , Greg Thelen , Johannes Weiner , Linux MM , Cgroups , LKML 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> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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