Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp26904ybz; Thu, 23 Apr 2020 17:33:55 -0700 (PDT) X-Google-Smtp-Source: APiQypJb57dHFh5BsfGe9nvP/ib530j7nwK3Ct2WG7b0Z13XJ5/2Rl6VVWSM1VpW57xesHwWVuwi X-Received: by 2002:a05:6402:4a:: with SMTP id f10mr5322982edu.274.1587688435700; Thu, 23 Apr 2020 17:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587688435; cv=none; d=google.com; s=arc-20160816; b=HeYS69bnaZTn0rNMZ9wZ+g9xIGPzALXEWPPvMnp9bHZi7KjmMUdUECd7TenluVybsE AcZOhNZgi8Yl6NYxA9zeSId8l1Osx5Jygg16pVDF9bOLHHgENUQ1w4N1G4SoaKb2sM8b M7QXyeakff4tbulG1PdRGoqBlTtfgmtYC4yrGoyT9UPG/HN7CbAsvuSn4QJ+urxEiIJg j2tH0qFYd/5N8j+YrYTMom5H214Vnc4FNLaQBczW9ZT77ZIlkpn0Lb9f3ro3TnZ2VQEi L8sdvzPQG3qYaegNOqSCLl/lx3eVljs3KX+Raa3z5oX5ad71LY37xuR+xehkYh0g+jci O4oQ== 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; bh=VKBqm9dD1eT/9SukXzSTV56tiVVlcyEzdR7J/pmXPKk=; b=a839gT0PMuRt+mFwqEetjiZQXfT75Cqmjxi0HtP8UKkFx3+TPxV5+grK8fKaffnATz 2yF8zRmk61+Z4N6fQqABtGAOTUBT2qAo073IKZRF9WyyYuFGmAgl5gsoVyNmet3Nw0YY 69N6mb+LiJkcrst/NhtpNLWn+Czbg1Wcjrfl6BQFXwOPlBJ5Ku4cv3/EBCNG2pTncrbL L1CM5V4YVMhYY20512KaYGBm+2H9H0Gu7cLM2VYl9uGfGPz9nesmK1mV0/tq4pVvYeFO 4isBB6aAw6bbnnLK8HVNdkXQqV0oavJnpbaflL5OI9uhInpmms7N8T32aoIJBXnxZ13m MTQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m89Egqb1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn4si2114663edb.239.2020.04.23.17.33.32; Thu, 23 Apr 2020 17:33:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m89Egqb1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728308AbgDXAaB (ORCPT + 99 others); Thu, 23 Apr 2020 20:30:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728151AbgDXAaB (ORCPT ); Thu, 23 Apr 2020 20:30:01 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3493FC09B042; Thu, 23 Apr 2020 17:30:00 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id n24so3077945plp.13; Thu, 23 Apr 2020 17:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VKBqm9dD1eT/9SukXzSTV56tiVVlcyEzdR7J/pmXPKk=; b=m89Egqb1/fpd9kMAnDYFVXpT/PykNFJynjooI9IkfNzptBO0nn6hRNuNFqW+S9/cQs I2G7BCUXvItMqimgVATxYqv+RILMmTTE4djYombXNLu7Z7n0bl+CqXPnvz16U6EO34Wm Cl2DFf5an4Lcfssj4J58eZqy/CAEkTbf154kGv5vfvMg/Ja8TA+7tat/vCLcw43k8XfA DepdD4VhfU78IPl278F8nFbHfOZ1CVrF/InsmkhRejTmrYOorm+sADgK48QqPxeygD27 7nQGN83N0yfvNd32LTvpnEtyHVNpEDdIg/dI0uCv/eAo+I6Q5DjtOMEeNrU755zx2Olf j1bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VKBqm9dD1eT/9SukXzSTV56tiVVlcyEzdR7J/pmXPKk=; b=cXylUdTRi8Xi4fRBfvBKP0KE68nROI4UYMKuBtLTwqpey79Iy0+ijMlfLzYVfyTrSt IvmS7dh4WPlkv25Et8krk1Nk3SgjbS6RDqkRMOLff0WCTsPf6OXyPrcu0Rr3eofecrKy oNECwla7RqiJzkQsGkOV2k17PCCeYtFojWtFa/e9i2V9CU5H8H2VeaC4s6d423M7Hn+M NC84SugB6iwFFFiAwGf91UrCaiW+BuoKcX0QeUN/QuEZs5PoWA7/QPd4fDOTLJTeKQui nmMiE1TFmNpRXI3hyEuXxefg4AVwJjOGFGABUkdnhvyC1m2TNMggRiVYOeiDe2to/wi2 z/qw== X-Gm-Message-State: AGi0PuZ9siDTaabgTJLPK8grHEy+m9DyhaFdW9T8gdVkkuTEooeg4LqK oYcIsnD+YgyN3PbjkEQJsoI= X-Received: by 2002:a17:902:8bca:: with SMTP id r10mr6200279plo.225.1587688199726; Thu, 23 Apr 2020 17:29:59 -0700 (PDT) Received: from js1304-desktop ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id a136sm3891498pfa.99.2020.04.23.17.29.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2020 17:29:59 -0700 (PDT) Date: Fri, 24 Apr 2020 09:29:54 +0900 From: Joonsoo Kim To: Johannes Weiner Cc: Alex Shi , Shakeel Butt , Hugh Dickins , Michal Hocko , "Kirill A. Shutemov" , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 12/18] mm: memcontrol: convert anon and file-thp to new mem_cgroup_charge() API Message-ID: <20200424002953.GB13929@js1304-desktop> References: <20200420221126.341272-1-hannes@cmpxchg.org> <20200420221126.341272-13-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200420221126.341272-13-hannes@cmpxchg.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 20, 2020 at 06:11:20PM -0400, Johannes Weiner wrote: > With the page->mapping requirement gone from memcg, we can charge anon > and file-thp pages in one single step, right after they're allocated. > > This removes two out of three API calls - especially the tricky commit > step that needed to happen at just the right time between when the > page is "set up" and when it's "published" - somewhat vague and fluid > concepts that varied by page type. All we need is a freshly allocated > page and a memcg context to charge. > > Signed-off-by: Johannes Weiner Reviewed-by: Joonsoo Kim