From: Dennis Zhou <dennisszhou@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Tejun Heo <tj@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>,
Christoph Lameter <cl@linux.com>, Roman Gushchin <guro@fb.com>,
kernel-team@fb.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Linux API <linux-api@vger.kernel.org>
Subject: Re: [PATCH] proc: add percpu populated pages count to meminfo
Date: Tue, 7 Aug 2018 08:03:16 -0700 [thread overview]
Message-ID: <20180807150315.GA59704@dennisz-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <3b792413-184b-20b1-9d90-9e69f0df8cc4@suse.cz>
Hi Vlastimil,
On Tue, Aug 07, 2018 at 03:18:31PM +0200, Vlastimil Babka wrote:
>
> Documentation/filesystems/proc.txt should be updated as well
>
Will do.
> >
> > +/*
> > + * 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;
>
> It better be unsigned long, to match others.
>
Yeah that makes sense. I've changed this for v2.
> > +/*
> > + * pcpu_nr_populated_pages - calculate total number of populated backing pages
> > + *
> > + * This reflects the number of pages populated to back the chunks.
> > + * Metadata is excluded in the number exposed in meminfo as the number of
> > + * backing pages scales with the number of cpus and can quickly outweigh the
> > + * memory used for metadata. It also keeps this calculation nice and simple.
> > + *
> > + * RETURNS:
> > + * Total number of populated backing pages in use by the allocator.
> > + */
> > +int pcpu_nr_populated_pages(void)
>
> Also unsigned long please.
>
Changed for v2.
Thanks,
Dennis
next prev parent reply other threads:[~2018-08-07 15:03 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 [this message]
2018-08-07 14:12 ` Christopher Lameter
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=20180807150315.GA59704@dennisz-mbp.dhcp.thefacebook.com \
--to=dennisszhou@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.org \
--cc=vbabka@suse.cz \
/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