Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752927AbbEFOaI (ORCPT ); Wed, 6 May 2015 10:30:08 -0400 Received: from mx2.parallels.com ([199.115.105.18]:40405 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752588AbbEFOaD (ORCPT ); Wed, 6 May 2015 10:30:03 -0400 Date: Wed, 6 May 2015 17:29:51 +0300 From: Vladimir Davydov To: Michal Hocko CC: Andrew Morton , Johannes Weiner , Tejun Heo , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Greg Thelen , , , Subject: Re: [PATCH 1/2] gfp: add __GFP_NOACCOUNT Message-ID: <20150506142951.GC29387@esperanza> References: <20150506115941.GH14550@dhcp22.suse.cz> <20150506122431.GA29387@esperanza> <20150506123541.GK14550@dhcp22.suse.cz> <20150506132510.GB29387@esperanza> <20150506135520.GN14550@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150506135520.GN14550@dhcp22.suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1446 Lines: 34 On Wed, May 06, 2015 at 03:55:20PM +0200, Michal Hocko wrote: > On Wed 06-05-15 16:25:10, Vladimir Davydov wrote: > > On Wed, May 06, 2015 at 02:35:41PM +0200, Michal Hocko wrote: [...] > > > NOACCOUNT doesn't imply kmem at all so it is not clear who is in charge > > > of the accounting. > > > > IMO it is a benefit. If one day for some reason we want to bypass memcg > > accounting for some other type of allocation somewhere, we can simply > > reuse it. > > But what if somebody, say a highlevel memory allocator in the kernel, > want's to (ab)use this flag for its internal purpose as well? We won't let him :-) If we take your argument about future (ab)users seriously, we should also consider what will happen if one wants to use e.g. __GFP_HARDWALL, which BTW has a generic name too although it's cpuset-specific. My point is that MEMCG is the only subsystem of the kernel that tries to do full memory accounting, and there is no point in introducing another one, because we already have it. So we have full right to reserve __GFP_NOACCOUNT for our purposes, just like cpuset reserves __GFP_HARDWALL and kmemcheck __GFP_NOTRACK. Any newcomer must take this into account. Thanks, Vladimir -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/