Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5361394imm; Tue, 19 Jun 2018 09:11:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKfXNP39Cs1Oj4gwMdzPbknwEkL/eIAyDkAG5dhwrUZ1d/edvokhVhpiDPELCN/nr/c3oXM X-Received: by 2002:a65:4287:: with SMTP id j7-v6mr15500306pgp.144.1529424701343; Tue, 19 Jun 2018 09:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529424701; cv=none; d=google.com; s=arc-20160816; b=m5Qerg7QQUe1Sb2Brau+G67e05xkdNbwXTYDzI6BnY5YdkvvshzWpMZYt5eLwjW5C6 33znv4hTj/vg6aWZB1ImCXPTlI8yOH+RCFx43RUby4/KiaOB2DikOsMYyFGfIQbcAtYA stLRIwJJePO3lOsgCK0rMIBBhDDtrCbhevYmJ8sBJc4M5U2KkhdVPERiNQ6gQsSHk2bQ VRp51vAaJXDG/MtiiCZVtkoBap0oS4hgwuHgqYv5OTHZuSQ8cIhL3tTLodVeiz789vvj Cc7I+3dlehsSIcJMNYXn1Gq3Vvj20mJY8Xb2CoQIbkTfvcGap1Vei6ICpAP1phphD6cn CaJQ== 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=+IqX0uvqzAWjSDuvjz2ayMip+Gsi1TKGyqUNwCy3Wgk=; b=nwPCXHlSl2WFDVYQ+rs+O/icej80IHtiUtxH4i2XW4v7vZfMRNm5m442Py/7o/1znN TdxH7TIfSIhTkimDvXJ0b5KzutrZXUVxGBgPAllxX+jqPwQ+lnCacxdpaBpoEg1DAfdK UZsrx5BJ7qMnyM1/xve3vlVYHiik35qs+q3e3z6CTTwNhqOQsSlpQmQjkCpMXeNEIRe3 KFf6Ey7FOJSKsVIDBWEPO6njGeIHEEUsrsHMg+8Qpzgv7Tzb78sQDYYVuIYOGD1jtR9b Sa6PiBP8kEnCte9025CxRQ22PxKSvrT4qZQYMi80gOtSkqTCUReZvnxJCAY5TfzvIuQB VXXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=TH3jD+yH; 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=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7-v6si40455pfd.124.2018.06.19.09.11.27; Tue, 19 Jun 2018 09:11:41 -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=@cmpxchg.org header.s=x header.b=TH3jD+yH; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967008AbeFSQJe (ORCPT + 99 others); Tue, 19 Jun 2018 12:09:34 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:48420 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966733AbeFSQJb (ORCPT ); Tue, 19 Jun 2018 12:09:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+IqX0uvqzAWjSDuvjz2ayMip+Gsi1TKGyqUNwCy3Wgk=; b=TH3jD+yHYEgEQsWkWsf9xNCyDy iH2seAn+hK6YDoD1ezwik4ADymd9SAaBXf+pvSjCCMLc166wBLk+4qbTG8OGxSt/A/MNrTvotc0zJ RXnNPjSWUbXSEluxLTcL4wcLqQ1ZQjBRUTD49J8SDMSJHb+zGzwCjTFIYFg+eksO29bM=; Date: Tue, 19 Jun 2018 12:11:49 -0400 From: Johannes Weiner To: Shakeel Butt Cc: Andrew Morton , Michal Hocko , Vladimir Davydov , Jan Kara , Greg Thelen , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v6 0/3] Directed kmem charging Message-ID: <20180619161149.GA27423@cmpxchg.org> References: <20180619051327.149716-1-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180619051327.149716-1-shakeelb@google.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shakeel, this looks generally reasonable to me. However, patch 1 introduces API that isn't used until patch 2 and 3, which makes reviewing harder since you have to jump back and forth between emails. Please fold patch 1 and introduce API along with the users. On Mon, Jun 18, 2018 at 10:13:24PM -0700, Shakeel Butt wrote: > This patchset introduces memcg variant memory allocation functions. The > caller can explicitly pass the memcg to charge for kmem allocations. > Currently the kernel, for __GFP_ACCOUNT memory allocation requests, > extract the memcg of the current task to charge for the kmem allocation. > This patch series introduces kmem allocation functions where the caller > can pass the pointer to the remote memcg. The remote memcg will be > charged for the allocation instead of the memcg of the caller. However > the caller must have a reference to the remote memcg. This patch series > also introduces scope API for targeted memcg charging. So, all the > __GFP_ACCOUNT alloctions within the specified scope will be charged to > the given target memcg. Can you open with the rationale for the series, i.e. the problem statement (fsnotify and bh memory footprint), *then* follow with the proposed solution? Thanks!