From: Christopher Lameter <cl@linux.com>
To: Dennis Zhou <dennisszhou@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Tejun Heo <tj@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>,
Roman Gushchin <guro@fb.com>,
kernel-team@fb.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc: add percpu populated pages count to meminfo
Date: Tue, 7 Aug 2018 14:12:06 +0000 [thread overview]
Message-ID: <0100016514bb069d-a6532c9a-b1ca-4eba-8644-c5b3935e3bd8-000000@email.amazonses.com> (raw)
In-Reply-To: <20180807005607.53950-1-dennisszhou@gmail.com>
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 <linux/mman.h>
> #include <linux/mmzone.h>
> #include <linux/proc_fs.h>
> +#include <linux/percpu.h>
> #include <linux/quicklist.h>
> #include <linux/seq_file.h>
> #include <linux/swap.h>
> @@ -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?
next prev parent reply other threads:[~2018-08-07 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 0:56 Dennis Zhou
2018-08-07 13:18 ` Vlastimil Babka
2018-08-07 15:03 ` Dennis Zhou
2018-08-07 14:12 ` Christopher Lameter [this message]
2018-08-07 15:11 ` Tejun Heo
2018-08-07 15:22 ` Dennis Zhou
2018-08-07 15:21 ` Dennis Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0100016514bb069d-a6532c9a-b1ca-4eba-8644-c5b3935e3bd8-000000@email.amazonses.com \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=dennisszhou@gmail.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox