From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82FB7C63777 for ; Mon, 30 Nov 2020 20:55:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C89632067C for ; Mon, 30 Nov 2020 20:55:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iESeb0ME" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C89632067C Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D6A826B0036; Mon, 30 Nov 2020 15:55:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D1BE56B005C; Mon, 30 Nov 2020 15:55:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C30F38D0001; Mon, 30 Nov 2020 15:55:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0215.hostedemail.com [216.40.44.215]) by kanga.kvack.org (Postfix) with ESMTP id AE26D6B0036 for ; Mon, 30 Nov 2020 15:55:05 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 767C7181AEF10 for ; Mon, 30 Nov 2020 20:55:05 +0000 (UTC) X-FDA: 77542289370.03.sail27_1007333273a4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 4E4D428A4E9 for ; Mon, 30 Nov 2020 20:55:05 +0000 (UTC) X-HE-Tag: sail27_1007333273a4 X-Filterd-Recvd-Size: 4375 Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Nov 2020 20:55:04 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id u18so24423263lfd.9 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=gfxcZU+K+hx+ApwwmFW5l2kWK4Zj9iwp5jmx3VPBFMLwvi7POB1oJYVFk6vbU9QrBF xheZEP3+7KnRkrhHbdobZkx08VN2gUCOpu5k5wUSj1ksT1H45lvfavZfTwlMW2g4ECAH WR8RlZKnUqbWgw3gjNMDWVp+h+7XyT+iXIczVedq2Vvx/LuW4Pb3rk4e/Kml0KSLHTA+ 24ODgXP9BBdB6Jyd/oklfEn3xY3hrLypsU+BcI4izOiNIopzzblBSmEnOyQxSuFG5yrj Jw69uypqDiy3G9G57J44u28KCvPIz4d6S1WkyxNx2S4NoKap0c9vCww8+syTEmPHKXFZ sm0w== X-Gm-Message-State: AOAM530EAPeCgprQgkH7YBoNL3/NqFUO1EK4L+Dktibk6+9GFXnLGtFi na5c+J4jX5DOPRyk8qqN2bxgp8TnswsRWW+qQ67RUA== X-Google-Smtp-Source: ABdhPJzHJ43OzzR4d4cxf19fhLc4beCs4TaEqmWwNN/y9mT68lRu90MXVtbbLHVdV/xQb4tKuITh1xD0DinGoiyOYCE= 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" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.