From: Matthew Wilcox <willy@infradead.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: gregkh@linuxfoundation.org, rafael@kernel.org,
adobriyan@gmail.com, akpm@linux-foundation.org,
hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com,
hughd@google.com, shakeelb@google.com, guro@fb.com,
samitolvanen@google.com, feng.tang@intel.com, neilb@suse.de,
iamjoonsoo.kim@lge.com, rdunlap@infradead.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, cgroups@vger.kernel.org
Subject: Re: [PATCH v4 3/7] mm: memcontrol: convert NR_FILE_THPS account to pages
Date: Fri, 11 Dec 2020 13:57:37 +0000 [thread overview]
Message-ID: <20201211135737.GA2443@casper.infradead.org> (raw)
In-Reply-To: <20201211041954.79543-4-songmuchun@bytedance.com>
On Fri, Dec 11, 2020 at 12:19:50PM +0800, Muchun Song wrote:
> +++ b/mm/filemap.c
> @@ -207,7 +207,7 @@ static void unaccount_page_cache_page(struct address_space *mapping,
> if (PageTransHuge(page))
> __dec_lruvec_page_state(page, NR_SHMEM_THPS);
> } else if (PageTransHuge(page)) {
> - __dec_lruvec_page_state(page, NR_FILE_THPS);
> + __mod_lruvec_page_state(page, NR_FILE_THPS, -HPAGE_PMD_NR);
+ __mod_lruvec_page_state(page, NR_FILE_THPS, -nr);
> +++ b/mm/huge_memory.c
> @@ -2748,7 +2748,8 @@ int split_huge_page_to_list(struct page *page, struct list_head *list)
> if (PageSwapBacked(head))
> __dec_lruvec_page_state(head, NR_SHMEM_THPS);
> else
> - __dec_lruvec_page_state(head, NR_FILE_THPS);
> + __mod_lruvec_page_state(head, NR_FILE_THPS,
> + -HPAGE_PMD_NR);
+ __mod_lruvec_page_state(head, NR_FILE_THPS,
+ -thp_nr_pages(head));
next prev parent reply other threads:[~2020-12-11 13:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 4:19 [PATCH v4 0/7] Convert all THP vmstat counters to pages Muchun Song
2020-12-11 4:19 ` [PATCH v4 1/7] mm: memcontrol: fix NR_ANON_THPS accounting in charge moving Muchun Song
2020-12-11 7:33 ` Pankaj Gupta
2020-12-11 4:19 ` [PATCH v4 2/7] mm: memcontrol: convert NR_ANON_THPS account to pages Muchun Song
2020-12-11 4:19 ` [PATCH v4 3/7] mm: memcontrol: convert NR_FILE_THPS " Muchun Song
2020-12-11 13:57 ` Matthew Wilcox [this message]
2020-12-11 14:14 ` [External] " Muchun Song
2020-12-11 4:19 ` [PATCH v4 4/7] mm: memcontrol: convert NR_SHMEM_THPS " Muchun Song
2020-12-11 4:19 ` [PATCH v4 5/7] mm: memcontrol: convert NR_SHMEM_PMDMAPPED " Muchun Song
2020-12-11 4:19 ` [PATCH v4 6/7] mm: memcontrol: convert NR_FILE_PMDMAPPED " Muchun Song
2020-12-11 4:19 ` [PATCH v4 7/7] mm: memcontrol: make the slab calculation consistent Muchun Song
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=20201211135737.GA2443@casper.infradead.org \
--to=willy@infradead.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=feng.tang@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=neilb@suse.de \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=samitolvanen@google.com \
--cc=shakeelb@google.com \
--cc=songmuchun@bytedance.com \
--cc=vdavydov.dev@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).