[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201207200155.GC2238414@carbon.dhcp.thefacebook.com>
Date: Mon, 7 Dec 2020 12:01:55 -0800
From: Roman Gushchin <guro@...com>
To: Muchun Song <songmuchun@...edance.com>
CC: <gregkh@...uxfoundation.org>, <rafael@...nel.org>,
<adobriyan@...il.com>, <akpm@...ux-foundation.org>,
<hannes@...xchg.org>, <mhocko@...nel.org>,
<vdavydov.dev@...il.com>, <hughd@...gle.com>, <will@...nel.org>,
<rppt@...nel.org>, <tglx@...utronix.de>, <esyr@...hat.com>,
<peterx@...hat.com>, <krisman@...labora.com>, <surenb@...gle.com>,
<avagin@...nvz.org>, <elver@...gle.com>, <rdunlap@...radead.org>,
<iamjoonsoo.kim@....com>, <linux-kernel@...r.kernel.org>,
<linux-fsdevel@...r.kernel.org>, <linux-mm@...ck.org>,
<cgroups@...r.kernel.org>
Subject: Re: [RESEND PATCH v2 09/12] mm: memcontrol: convert vmstat slab
counters to bytes
On Mon, Dec 07, 2020 at 11:46:22AM -0800, Roman Gushchin wrote:
> On Sun, Dec 06, 2020 at 06:14:48PM +0800, Muchun Song wrote:
> > the global and per-node counters are stored in pages, however memcg
> > and lruvec counters are stored in bytes. This scheme looks weird.
> > So convert all vmstat slab counters to bytes.
>
> There is a reason for this weird scheme:
> percpu caches (see struct per_cpu_nodestat) are s8, so counting in bytes
> will lead to overfills. Switching to s32 can lead to an increase in
> the cache thrashing, especially on small machines.
JFYI:
I've tried to convert all slab counters to bytes and change those s8 percpu batches to s32
about a year ago. Here is a link to that thread:
https://patchwork.kernel.org/project/linux-mm/patch/20191018002820.307763-3-guro@fb.com/
Thanks!
Powered by blists - more mailing lists