Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4778540imm; Tue, 7 Aug 2018 07:13:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpemChwxd+4A1fqTtSFets014OuariuFCwkYJZmvWDNlLXF3wF+eQlWSD5Eb/7ShNXUvkoi+ X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr18113489plp.14.1533651236572; Tue, 07 Aug 2018 07:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533651236; cv=none; d=google.com; s=arc-20160816; b=VcU3boLa1thmNiLphnejemz8RpMfOUYM68kM5bGgEGmX7AVtBI7Kcca/nsOwFsYdIX 8S/551ETfILfRg6VUvlgWyfXEH+T3/NzEE0J3NPtm2ZD7Aak5dewqS7hDl7PWS/F8toa JVt38h/PTPlD94zNWJ+dDCUbg0YhnQDSpptGvhH1rbmyTWo9e9ArIeGlPBrltAY1ru79 Ux3+zW6wVQPX2T/e0FK6m0dJd+roRjBADcv1O3LPyBdkBBHUC3tdUATaxf3Vrezmg4F5 6VLttyoomDbHYnEqz9YSqTP4mgXf9WZjg7fEx8mK5cb01BrWBZzPgd/rdGK+ca09mmzL Mu2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=h66ODgCZVjHONIi8nndBdapa4aeWrW75AyvaYfMzO2s=; b=KgmPD6s1YVwkuq20o69ejD/tbey4dwdiETs/OydffyJQY0a6U/UTl2ptMjZjqEwytp 3Wq8SZjkcXRY5M/CrvRgIbLjzJUPhTdyoHvGej/1aQQP2oJmdNLTaYYV6TETbofWCvyz Q8aKq/JgwJm3twLlNLK7BesrXyqHEiLKcikSZuQpoi/pdkojla7xywLJPgZxX1TFlJFw gxbkaJwrZqpuZLrXHpPTlxm96vldkEb2KoRSoiwsuRGJaQvKvbjfTOfvZo6P4uvpNTyO LAcFRQVK6Xl4cxePUKAJmo7g/fkNBvlggC824/ROV3/NyfkOAuyjHi1J6p6ZzMCWtsLe aqug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=R+IT9rao; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5-v6si1500773pfd.112.2018.08.07.07.13.41; Tue, 07 Aug 2018 07:13:56 -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=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=R+IT9rao; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389465AbeHGQ0h (ORCPT + 99 others); Tue, 7 Aug 2018 12:26:37 -0400 Received: from a9-92.smtp-out.amazonses.com ([54.240.9.92]:39256 "EHLO a9-92.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388839AbeHGQ0h (ORCPT ); Tue, 7 Aug 2018 12:26:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1533651126; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=1oesMzKP0x3ZMClTXXKwvhy9WFETe1t4vHe4i+/quXg=; b=R+IT9raoxHKAK5FVgDx7I4vlmUcPjfyOL1XI/g23vi+YUVoPmUJB7LQPRYHhAX76 A750ZCEAd13I6CVFSc5iLA/OGVdqKoVuZ5DOYAopiNtmT3mv5oMtcp/UIjJ31jkuCLD ReKqnRUoINydkqVOzqkvV9tl0z9X2huQibL/tWDs= Date: Tue, 7 Aug 2018 14:12:06 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Dennis Zhou cc: Andrew Morton , Tejun Heo , Johannes Weiner , Roman Gushchin , kernel-team@fb.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] proc: add percpu populated pages count to meminfo In-Reply-To: <20180807005607.53950-1-dennisszhou@gmail.com> Message-ID: <0100016514bb069d-a6532c9a-b1ca-4eba-8644-c5b3935e3bd8-000000@email.amazonses.com> References: <20180807005607.53950-1-dennisszhou@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2018.08.07-54.240.9.92 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 6 Aug 2018, Dennis Zhou wrote: > diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c > index 2fb04846ed11..ddd5249692e9 100644 > --- a/fs/proc/meminfo.c > +++ b/fs/proc/meminfo.c > @@ -7,6 +7,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -121,6 +122,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v) > (unsigned long)VMALLOC_TOTAL >> 10); > show_val_kb(m, "VmallocUsed: ", 0ul); > show_val_kb(m, "VmallocChunk: ", 0ul); > + show_val_kb(m, "PercpuPopulated:", pcpu_nr_populated_pages()); Populated? Can we avoid this for simplicities sake: "Percpu"? We do not count pages that are not present elsewhere either and those counters do not have "populated" in them. > int pcpu_nr_empty_pop_pages; > > +/* > + * The number of populated pages in use by the allocator, protected by > + * pcpu_lock. This number is kept per a unit per chunk (i.e. when a page gets > + * allocated/deallocated, it is allocated/deallocated in all units of a chunk > + * and increments/decrements this count by 1). > + */ > +static int pcpu_nr_populated; pcpu_nr_pages?