From: Hugh Dickins Subject: Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes Date: Mon, 7 Dec 2020 12:33:18 -0800 (PST) Message-ID: References: <20201206101451.14706-1-songmuchun@bytedance.com> <20201207130018.GJ25569@dhcp22.suse.cz> <20201207150254.GL25569@dhcp22.suse.cz> <20201207195141.GB2238414@carbon.dhcp.thefacebook.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=VF+dRBuajSL16Efm+Qk9iftapw2E7SOSirPhcnw+PnQ=; b=ZRA2+e52xlSYiJHPZTaBAxFXuVgSCguGt+17cXdyunFJAuKyaHC0N9M0+4wVV+JNu/ aS6Ru6m3Y+wnCnDvTaR0B9YOhtU4H+7LE/3LGO0G8PmR1IrdqhucfywKGLBMNQLyMXu/ XJSr+UlHYySaZWgshmFkJXhyvI//6ZYqsYHP2wgrjLmT1qlB1JlPb9O13tbr6L0bBWLe GRMCt7godtRnbrHZWJKC5DL6rW4nmuRO1x9OHwbZyq7CAqDi7cjSnTBdGjEjq1IFVhKo fbeRgmd7/Vs61w3QEF43+SBNzMP6YdnFO+5G59r4xPy9OUThCHiccAY3BNCrGBsllVky hvJQ== In-Reply-To: <20201207195141.GB2238414@carbon.dhcp.thefacebook.com> List-ID: Content-Type: TEXT/PLAIN; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Roman Gushchin Cc: Michal Hocko , Muchun Song , Greg KH , rafael@kernel.org, Alexey Dobriyan , Andrew Morton , Johannes Weiner , Vladimir Davydov , Hugh Dickins , Will Deacon , Mike Rapoport , Thomas Gleixner , esyr@redhat.com, peterx@redhat.com, krisman@collabora.com, Suren Baghdasaryan , avagin@openvz.org, Marco Elver , Randy Dunlap , Joonsoo Kim , LKML , linux-fsdevel , Linux On Mon, 7 Dec 2020, Roman Gushchin wrote: > On Mon, Dec 07, 2020 at 04:02:54PM +0100, Michal Hocko wrote: > > > > As I've said the THP accounting change makes more sense to me because it > > allows future changes which are already undergoing so there is more > > merit in those. > > +1 > And this part is absolutely trivial. It does need to be recognized that, with these changes, every THP stats update overflows the per-cpu counter, resorting to atomic global updates. And I'd like to see that mentioned in the commit message. But this change is consistent with 4.7's 8f182270dfec ("mm/swap.c: flush lru pvecs on compound page arrival"): we accepted greater overhead for greater accuracy back then, so I think it's okay to do so for THP stats. Hugh