Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp65275imm; Tue, 19 Jun 2018 16:02:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIuoikVvAn8QbAAFuTPuRnZOzvX71oNZ+IP8g/srPrdChBqhSA5neaQe/PLTnetsbdt/Fqj X-Received: by 2002:a62:fb05:: with SMTP id x5-v6mr20205522pfm.210.1529449368009; Tue, 19 Jun 2018 16:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529449367; cv=none; d=google.com; s=arc-20160816; b=CZbBj3gcJ31qU22k+fRMYFa2Jpz49eMP/s723KCMzqU3qkcV4ztB9rK5NmjbPG8IZD 0aBwtl0h0h3fkQEdPt+3st3p5pnVdGy74sl+7RkJkEIdQ6oiIUvn9cie1Zl3QGFNvZB5 eTKqQYXzc6P73vrQ3kbka62Hdzh6IAVKcmxSbBCQf4wvTgRBsZKGU+1gfm4smg+/ZhU5 U/W9xkh8xQL18HbZGjeu9k3UyYs9hfxTqPX5cbtdZKoG2WSeYMqv9bFVV2Bq8TSZ/VBv zc7n5Sep0jcGAeoypOwYGFonv6Xw0UbtXZTp54As182NQ1ptGaLIVDGInR0lWmpk2J6l b0hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=zb3AjJowosb9dhIaQWVidJRDXoJHlmvZeXg5JHXf2xg=; b=HgW2rr13QgOJfYeJ6El2mh/r78xIXZj4qsiGrhANZM2D9Si836vHYdwPjdPN8MTnK2 TXcRBQ5wXpkimVfZ+DIBDa7LkXTdqRqzmmowqKw/fks6ZpxbbmCkvHm3LVb2kYaprycU G4IaPdr/XSWX6E7PIx7I4QFsRt/pIm3ClArhie7pox26HadfK0I8pVSssYAHxLsstH/1 cRkI9ikIMRX5eHyqVUt8GFSSgBZ/4dOcLzhJG3wN2luKQ0+gsfMLo3eT4hgcaVCHRcJM 1vTSW/7QyL9ZLFAbxUOkF18u+8YVWIjOK7CnHU8yrZuZhLPFTelteck0IJRec2HMSZcT TYYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=o+kdv+GS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y20-v6si696283plr.55.2018.06.19.16.02.33; Tue, 19 Jun 2018 16:02:47 -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=pass header.i=@google.com header.s=20161025 header.b=o+kdv+GS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754236AbeFSW6y (ORCPT + 99 others); Tue, 19 Jun 2018 18:58:54 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:40047 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754177AbeFSW6v (ORCPT ); Tue, 19 Jun 2018 18:58:51 -0400 Received: by mail-wr0-f195.google.com with SMTP id l41-v6so1255903wre.7 for ; Tue, 19 Jun 2018 15:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zb3AjJowosb9dhIaQWVidJRDXoJHlmvZeXg5JHXf2xg=; b=o+kdv+GSp/AQxWgH4loxhm4G7MLU9afWCP2I8pgEwr24jnPSbZGqm/jRg1iP4gePW1 UwmrDpSEvwAv1RcPe/nJX1BNZ8FKPBng+YRmS8CuFnKTLrFbmptc0w+gKxgoqHWPGGQE eDJSa5B1Q+320W7PfohDAVQk/1ZvADDF3bQxt5TCQ7R1TYAQiLehY+MT5urDSV40Bb4P q4ZbvCTzDZhustuEQWOlrWjK3ISVDYb4SRHeukzaRafhtoofYK8mO2dtYak5nA2cqndu NugDjEfIY/U/O68/vF3J01WkIknbZQHS4WSnhoX/GVOau8XTIY4W+ItvX+RTETU/8Cdk xZCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zb3AjJowosb9dhIaQWVidJRDXoJHlmvZeXg5JHXf2xg=; b=pNHo8U2LX3Z9u6UoLqRER7pj6savOflmll2eauhOcnDNj9GS5BHietINZHOSY91If2 53bx2CHvQ2FD2szrHH9xwiS2e96aeKeMqCLg7l6g5tIOY5BKM71pkr63mh05LJ7x56TX /ZOpvcuMVp1uNxXKNqSboEf015AvsfJYqBirV8q4sv3jYzL4vPXZSeRFr3bNG3z97wOh EEeZ999qiFy+mTd9JKez3SQ8IXueBkXHN/JvoAcEsWdpw5hYOoD6LmNXPuj0tt+zi5IY 8Qy96RO6wrrSm3QukXCdoB/VwmcJUUnONSeCxCEvCcYbzS5j7udRAbT1tGd+UCe0h/eb pd1g== X-Gm-Message-State: APt69E0zjw8gQbb6Ve0TALxFUrKmSzHYy+bfjkEMGcHpkUPS597YLzur z64G4WDxNqwQN2mabGga00kdD/9/KtpkR9ookGPyew== X-Received: by 2002:adf:b3d4:: with SMTP id x20-v6mr16117740wrd.272.1529449129647; Tue, 19 Jun 2018 15:58:49 -0700 (PDT) MIME-Version: 1.0 References: <20180619051327.149716-1-shakeelb@google.com> <20180619161149.GA27423@cmpxchg.org> In-Reply-To: <20180619161149.GA27423@cmpxchg.org> From: Shakeel Butt Date: Tue, 19 Jun 2018 15:58:38 -0700 Message-ID: Subject: Re: [PATCH v6 0/3] Directed kmem charging To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , Vladimir Davydov , Jan Kara , Greg Thelen , LKML , Cgroups , linux-fsdevel , Linux MM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 19, 2018 at 9:09 AM Johannes Weiner wrote: > > 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. > Thanks a lot for the review. Ack, I will do as you suggested in next version. > 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? > Sure. thanks, Shakeel