Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp353619imm; Thu, 31 May 2018 01:24:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ21RKI0z7hGALtIwNMCh74vdIndAaRyuC0s+8P316NN7GmTyN1jsET/MnhpC7P7T8FF96R X-Received: by 2002:a17:902:bd4c:: with SMTP id b12-v6mr6232648plx.242.1527755083716; Thu, 31 May 2018 01:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527755083; cv=none; d=google.com; s=arc-20160816; b=oZB0E1lG5QoaS1QZ+CuO6DvpP3d6C4ftFWLsACZiseHBNYxsTKm83peJupdM/aZF3g 6RR3BPsvG7+KpHXAgWXRtiviKsx+o+Ix1VSR1PkMieWixu8OIlAEdXxLJI3LNVze0f/a d8Ggho+ZH0t9bdkrWu1Jg1Jn4fU4DcDcOvfQMJT9aguTPz04SlxWDQ4drOA5UnqXO4FS smTU9eyYH5qHNILWajPrnGcU/BDHBZrerlJDhBeEGi2sJ9Ie8RLi1ThIWdAYPkzQDRgv 4a5dcdJlMJgH1Y+9SaIk6Znw3/0N8z8GTvPjjqnR0wikfkeXTbhcykowXXGZQxDbm5Fp IJZQ== 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:dkim-signature:arc-authentication-results; bh=1iJECh9hcwzZjua5X69bSQGyGz6Uxy7aFiZPB6tGANE=; b=hfnbufx81SY8GFrj1P6M/3SeS+DN/FpVcYhmm0gAvGhqXQ0LDw5O5ZHBqtBXXr8T/E 5UC02EEjMC9ndMlcdWw/QcX2NJY8FgazMnzs4t8VFPyt1jdC0g9NMLqgSw+busGuuxXU dyRcFQZ1ggSLsL1ZU9BqmfRSi1f07VTCTS8EP7GdEPTULHMHKkeWZbC0VBukW88F8hPI fK1vAvqbpaGp7882pRICY1EsakdSa5aDodTGIs9YStx9Y12lv7CNHrAUmsDZ+Ti4Ki2P lCANafeopqpGJn8Yc70Q4RPgvbjgW+KFhJ9496OIXCkgnEdbu0pqov0ruy2dsSkRKwl6 Fm7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=dK9DL5zx; 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 u19-v6si36910727pfn.241.2018.05.31.01.24.29; Thu, 31 May 2018 01:24:43 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=dK9DL5zx; 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 S1754090AbeEaIXc (ORCPT + 99 others); Thu, 31 May 2018 04:23:32 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:46342 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753957AbeEaIXY (ORCPT ); Thu, 31 May 2018 04:23:24 -0400 Received: by mail-pf0-f196.google.com with SMTP id p19-v6so6178896pff.13; Thu, 31 May 2018 01:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1iJECh9hcwzZjua5X69bSQGyGz6Uxy7aFiZPB6tGANE=; b=dK9DL5zxVSEtXPZveEbafgsSmLiCuuMy02fajoh9+tx88Nk7ULyBl0n0mvpzj4MkAP xIGQBltvAlLai5EQLpCTVvlqhJV9Zp2K5sV0d6ApALgLV/FkFFpxLcfjMkGBJfWSvhru vCulq5KQ1Xy1owxE2wVmvmuFrNwuMFeplgkib9CerciJB16NOGk5h0Z/p92t9Z8lqWb4 EcGG7utqGiSPDufyPGIrxgSN6nhBU4Kq8e1G7273izjWJXC8LqSmKuB9qu/OpYPQq1Gd zCiKodALgVvvR0lxAeAi978Eivui7OPGhPNlyOMjraOhObi8hjVuG9JYOcZ3DaA1vSiW rGJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=1iJECh9hcwzZjua5X69bSQGyGz6Uxy7aFiZPB6tGANE=; b=B7e9Tsi354aPnfhAcdBs2D60DOizx7t0lF9+M6LmfW00ef0ACnGLdeHonemQCC6oK6 eqaM/JBrYk3yIfdPKOpk3gkF2WLBl/6SWwDp2+1tvOtkaGgvKsqLy19aIREWkmCkDZh5 1jmLosZZd5YsWCzhMlJ6+KdiTN7el8D5cG047Dlblb9B3W3cjQHN9DTP4ELOhJRgNO1o m5m4HTBy4k1lh4beR1cxGyV63ZtAuqMLeLIwfH3+07cJ9XawzpDQfiCVSx9+t9mKBchN q2Rlflxrv9tLzLzbBMpZndSeJBr73QS0XofRH4rYdQZP0D93wk+N63UGeyiaUn7J6/79 25ug== X-Gm-Message-State: ALKqPwe5UEfhtVgWj4pOaTw0srgBTCgiW/1JqZlfcDlS7RGLDdut9BID V8SUglaXLrpC5+EM//q6aLU= X-Received: by 2002:a62:481d:: with SMTP id v29-v6mr5880651pfa.57.1527755003276; Thu, 31 May 2018 01:23:23 -0700 (PDT) Received: from rodete-desktop-imager.corp.google.com ([2401:fa00:d:10:9465:817a:e0d1:934d]) by smtp.gmail.com with ESMTPSA id z7-v6sm49317301pgp.74.2018.05.31.01.23.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 May 2018 01:23:21 -0700 (PDT) Date: Thu, 31 May 2018 17:23:17 +0900 From: Minchan Kim To: Michal Hocko 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: <20180531082317.GA52285@rodete-desktop-imager.corp.google.com> 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> <20180531065642.GI15278@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531065642.GI15278@dhcp22.suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > > > >> 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 Maybe, no. I didn't set anything. IOW, it was a default without any setting and I hit this as you can remember. http://lkml.kernel.org/r/<20180418022912.248417-1-minchan@kernel.org> We don't need to allocate memory for stuff even maintainers discourage. > 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