[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180807152107.GB59704@dennisz-mbp.dhcp.thefacebook.com>
Date: Tue, 7 Aug 2018 08:21:09 -0700
From: Dennis Zhou <dennisszhou@...il.com>
To: Christopher Lameter <cl@...ux.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>,
Johannes Weiner <hannes@...xchg.org>,
Roman Gushchin <guro@...com>, kernel-team@...com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: add percpu populated pages count to meminfo
Hi Christopher,
On Tue, Aug 07, 2018 at 02:12:06PM +0000, Christopher Lameter wrote:
> On Mon, 6 Aug 2018, Dennis Zhou wrote:
> > 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"?
Yeah, I've dropped populated.
>
> We do not count pages that are not present elsewhere either and those
> counters do not have "populated" in them.
I see, that makes sense. I think I was trying to keep an external
distinction between what we reserve and what we actually have populated
that really isn't useful outside of playing with the allocator itself.
> > 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?
>
I'd rather keep it as pcpu_nr_populated because internally in pcpu_chunk
we maintain nr_pages and nr_populated. That way we keep the same meaning
at the chunk and global level.
Thanks,
Dennis
Powered by blists - more mailing lists