Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5795657pxu; Thu, 22 Oct 2020 11:12:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/cK+tSjCY5/FPx8euXK6nPksVYtsh6kCJMMe2ooIRtrtiBmIt6UJ43XFQGw3okSl2bBOq X-Received: by 2002:aa7:c714:: with SMTP id i20mr3563041edq.136.1603390375232; Thu, 22 Oct 2020 11:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603390375; cv=none; d=google.com; s=arc-20160816; b=pX/TU1/OZ6ljA4aXkJemwxUxfLGfGB1+D5D5P8wkEnzrPnXhkGBRtfe5nB53jmV7l/ YldI5p5sujZG6YD1kUjE2lJ63s9pYHfwP/noW7twtE3N8uN9rzVlJR+Fk4svVDllQK3s ywghfUjZuQVQX9luVv4mlchlRwtNXf/IuQiWtImc2/ef7cnJrdbf4DhAwv2qAT6ZiK9f omZSTa42P8W74p1KPu7S4OF//MZu/W0/GHaf2aNeFiI5CedSEjysELolkWPr4WzDuKLh 2XNeN0YqHbLwBITqOBPnHIXdEHvbeXAWbxC0Fuku5L2pwj5MFHXkZOZf481OHJN0LXQ6 lwTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=gNxhfxZhO6O3oe6GGPy77R5Q+XXdz/W9+qiG+KZZR24=; b=MZwG66OMjtws0KFyRLpXoCP07kVmcjVdhypgSsPasNaTqaYzmrc78bhewAO8LPG8ks 1F1JAdcpDSM5U9NsEL3mFVhWfNJQQJ1y00J4HzaHpzotvjLXuKYy5L2ivqrUbZwTzJo6 zFFEiJt/T4OPqOTcGCEt37c7izVy/0SI8ZcbayebpP4Ol1SnsoiaoMIItf1xXGx80xfo PToL2nVydKnVsLv95EsBpEiLLIWtXXfVw6jMobxVCor9/1ufX3g+TOh83X5jNn92RDxD tP+8GIwWiMuPTTcer0OK/D3fyq8Qox15GwmDUaz+4MRtFSTiPegAarfoeDsFESWrhx+A Bs7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si1781476edw.241.2020.10.22.11.12.33; Thu, 22 Oct 2020 11:12:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2898343AbgJVQ57 (ORCPT + 99 others); Thu, 22 Oct 2020 12:57:59 -0400 Received: from shelob.surriel.com ([96.67.55.147]:34926 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2898332AbgJVQ57 (ORCPT ); Thu, 22 Oct 2020 12:57:59 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kVduW-0001tE-8q; Thu, 22 Oct 2020 12:57:56 -0400 Message-ID: <004fe66ee1d111ec006dd065b9bed5fdcfdaad01.camel@surriel.com> Subject: Re: [PATCH] mm: memcontrol: add file_thp, shmem_thp to memory.stat From: Rik van Riel To: Johannes Weiner , Andrew Morton Cc: Michal Hocko , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Date: Thu, 22 Oct 2020 12:57:55 -0400 In-Reply-To: References: <20201022151844.489337-1-hannes@cmpxchg.org> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-q/yjJ9zoR2cgocIosU9b" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-q/yjJ9zoR2cgocIosU9b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2020-10-22 at 12:49 -0400, Rik van Riel wrote: > On Thu, 2020-10-22 at 11:18 -0400, Johannes Weiner wrote: >=20 > > index e80aa9d2db68..334ce608735c 100644 > > --- a/mm/filemap.c > > +++ b/mm/filemap.c > > @@ -204,9 +204,9 @@ static void unaccount_page_cache_page(struct > > address_space *mapping, > > if (PageSwapBacked(page)) { > > __mod_lruvec_page_state(page, NR_SHMEM, -nr); > > if (PageTransHuge(page)) > > - __dec_node_page_state(page, NR_SHMEM_THPS); > > + __dec_lruvec_page_state(page, NR_SHMEM_THPS); > > } else if (PageTransHuge(page)) { > > - __dec_node_page_state(page, NR_FILE_THPS); > > + __dec_lruvec_page_state(page, NR_FILE_THPS); > > filemap_nr_thps_dec(mapping); > > } >=20 > This may be a dumb question, but does that mean the > NR_FILE_THPS number will no longer be visible in > /proc/vmstat or is there some magic I overlooked in > a cursory look of the code? Never mind, I found it a few levels deep in __dec_lruvec_page_state. Reviewed-by: Rik van Riel --=20 All Rights Reversed. --=-q/yjJ9zoR2cgocIosU9b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl+RuhQACgkQznnekoTE 3oNrzwf9GSWmH30yYW4VoJhqcAiuVzpHRu/K7HGUTezlWzZgMV+ef6NYaUk0NItK sIgNpwCkeBZXg99ZG6y7o/yBiMLB7LR9E5PdREv+7CQrgZ8dvTbu0OhsmhOvo8TL +ufRBaAt4aK1Melt27dbnooHH43PVqRODDI9nkp4NU/aSIGami/KCAIGf3JfMEyR mK7THczWyFCknk1LWfPIbhYb3cneiwM62w07Xn3Fs4ord5612IvbW3iULFEMQwAO FUQ8DZycLWEIJL9DDa/eYeNH9c0cq0tzdiRBsaESVnT4q/I0gapNN4eLora3VCzi xqEBWQ22PQDOuUdJ0Lc7fyrhnplMWA== =/3Jx -----END PGP SIGNATURE----- --=-q/yjJ9zoR2cgocIosU9b--