Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3909168pxu; Mon, 30 Nov 2020 12:57:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJziWG9WvM60SGipA6eLmFHoEpgpUtHntnBNYrQ+J+NaMosvxk/+4HHvBS03o92esZdPRUU0 X-Received: by 2002:a17:906:b118:: with SMTP id u24mr21400236ejy.500.1606769846600; Mon, 30 Nov 2020 12:57:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606769846; cv=none; d=google.com; s=arc-20160816; b=cto3Y1G8OUDDO3HgBERTf7x+tPywNhkj3ktJ7E0frCqdU3VkJELqnu7FZtEMYCTYAk Kc0zVNr2c9PpjHRnSskqVzPMcUDYSIZl9iFiPxOdXiIIn+6lZZLA4fZKg4macLQt4ytg HrxIHP55X573ivDyEQiwKDVCcWSQ+jq1J4WThXLNYhglWxB5EHupyZ6QMwhk75Ff9SzR 8b9momjcQ/a0XNdB/yjjExeiBHLHkQL653akfy9rayFe0WMTwgSYYPrm7X+2O8q6UCYa Yr5AUP1Pi+01GD36tTRn+ATEOnQWraU0BnMP3jGQ8c0a6JDjhI4O57n0C5ar9tEUHaGN jzRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yTfnzUqR7eE/c5ODBZauRmscBfaFynv4YFH6nH3o6Mg=; b=xYk6bh6zKqvX2j0X5Oa74eJllMcuWlIZAx6T5e5KGmGIDQBKWOKT8hJJ9SxDKtFynF BGydIfIAnQebGQkwnpjpOUATYCuWsq3pMNZm2QpeieaDhqETx2msEIPg/tUPT4ItZbxE aRyKIpSkAXlTrQxLXwGnbCn2IRCMtQdBefGKHUuZKaqwKV6XArpkpXj33PkyTeY9h1X3 25txACPkz6db4QroW5jH3YxIz7bKF9VgWX/LsQmJRkzYz6Z0wbQXAuQ1F1L0BoetWZQp DVpLKTeHhezU/kfP9BjiDRYay4EwZez0Ywerv7FU+pMM6BxPtJ9SCh64l6dHtPbPsMSe hgEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=iESeb0ME; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si8661082eds.56.2020.11.30.12.57.04; Mon, 30 Nov 2020 12:57:26 -0800 (PST) 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=@google.com header.s=20161025 header.b=iESeb0ME; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729952AbgK3Uzp (ORCPT + 99 others); Mon, 30 Nov 2020 15:55:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728337AbgK3Uzp (ORCPT ); Mon, 30 Nov 2020 15:55:45 -0500 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEB77C0613CF for ; Mon, 30 Nov 2020 12:55:04 -0800 (PST) Received: by mail-lf1-x143.google.com with SMTP id t6so24414320lfl.13 for ; Mon, 30 Nov 2020 12:55:04 -0800 (PST) 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=yTfnzUqR7eE/c5ODBZauRmscBfaFynv4YFH6nH3o6Mg=; b=iESeb0MEH+7s/qExp/N3mktxXfWdHWiEV13q9UH7sjCcZr9JnlrDn3s4e/clEfIJxd fbJX6mH+q+YqVO18WVSz2GvFEnKpnWUDssJiTtBtvsLTfZfBKSx4c2+TTZs7h+RlA7zN h4OPVb9idK6JPmb1lIfk64NTM+TfWJp1eO1U2l3ami9U0M0HQC39oK4hnnq+qW6xSN4e i6qh5U0IkCPCytPoXvVd8wKKikt2hWDUhHd9PgB4l/PMH5Gm2F1llnLZoPwG2noq6SYl E/tBnVZm3aUGBjrqB+Sxd1Wm3ZGXnjcfUKfRIv1wEnp6y6sDhm/qw0YK9p0e87kufIDU 4t2w== 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=yTfnzUqR7eE/c5ODBZauRmscBfaFynv4YFH6nH3o6Mg=; b=U7N+kl1o2KV9xJUablvhvMtnDszaqiR6mjlbslA+1wRhcUNNw/ihh+lOEmQDqaC/DJ li7Hyh3E+5ASC3KiIYLr9bZTPaNW6tetK54tgupNiZdNyCiWqydmWewaEYnV3qItWLX7 F/CPG+7qJuW0HcNsXoNC0yGc7v1L9GwUdHykOiwD3Yl8GG/rlimpCKT9ZbK20yXUwc7W MD8U95kI7aMDPF78iF6SJq/6Qs1Oy2CFJ4NheH0wXgzhGqJzw5S9nAb71Or9FPQg4Ajt It72T69Z5//O610oZGmVpYg53oynvUTHLt3uwi2bgSZVsep/F7kksmBXfP2uTYWHwaQa UQCA== X-Gm-Message-State: AOAM533WAqSJVGISmGx3FCfeKhHbsLzu4q3d1vz3tIjkYMXOdEC2hgaW OrmRp1iiAmBEQsbOVL5cAYKhhdiW76BRbUCAt+aX9w== X-Received: by 2002:ac2:5a4d:: with SMTP id r13mr10001081lfn.449.1606769703096; Mon, 30 Nov 2020 12:55:03 -0800 (PST) MIME-Version: 1.0 References: <20201126005603.1293012-1-shakeelb@google.com> <20201126005603.1293012-3-shakeelb@google.com> <20201130201916.GB23216@cmpxchg.org> In-Reply-To: <20201130201916.GB23216@cmpxchg.org> From: Shakeel Butt Date: Mon, 30 Nov 2020 12:54:51 -0800 Message-ID: Subject: Re: [PATCH 2/2] mm: memcontrol: account pagetables per node To: Johannes Weiner Cc: Roman Gushchin , Michal Hocko , Andrew Morton , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 12:21 PM Johannes Weiner wrote: > > On Wed, Nov 25, 2020 at 04:56:03PM -0800, Shakeel Butt wrote: > > For many workloads, pagetable consumption is significant and it makes > > sense to expose it in the memory.stat for the memory cgroups. However at > > the moment, the pagetables are accounted per-zone. Converting them to > > per-node and using the right interface will correctly account for the > > memory cgroups as well. > > > > Signed-off-by: Shakeel Butt > > Agreed, this is a useful stat item to have. > > Just one trivial issue: > > > --- a/include/linux/mmzone.h > > +++ b/include/linux/mmzone.h > > @@ -151,7 +151,6 @@ enum zone_stat_item { > > NR_ZONE_UNEVICTABLE, > > NR_ZONE_WRITE_PENDING, /* Count of dirty, writeback and unstable pages */ > > NR_MLOCK, /* mlock()ed pages found and moved off LRU */ > > - NR_PAGETABLE, /* used for pagetables */ > > /* Second 128 byte cacheline */ > > NR_BOUNCE, > > #if IS_ENABLED(CONFIG_ZSMALLOC) > > @@ -206,6 +205,7 @@ enum node_stat_item { > > #if IS_ENABLED(CONFIG_SHADOW_CALL_STACK) > > NR_KERNEL_SCS_KB, /* measured in KiB */ > > #endif > > + NR_PAGETABLE, /* used for pagetables */ > > NR_VM_NODE_STAT_ITEMS > > }; > > You need to update mm/vmstat.c::vmstat_text accordingly or > /proc/vmstat output will be bogus. Oh I missed that. Thanks for catching. > > With that fixed, please feel free to add: > Acked-by: Johannes Weiner Thanks.