From: Muchun Song <songmuchun@bytedance.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Hugh Dickins <hughd@google.com>,
Shakeel Butt <shakeelb@google.com>, Roman Gushchin <guro@fb.com>,
Sami Tolvanen <samitolvanen@google.com>,
Feng Tang <feng.tang@intel.com>, Neil Brown <neilb@suse.de>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Randy Dunlap <rdunlap@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Cgroups <cgroups@vger.kernel.org>
Subject: Re: [External] Re: [PATCH v4 3/7] mm: memcontrol: convert NR_FILE_THPS account to pages
Date: Fri, 11 Dec 2020 22:14:22 +0800 [thread overview]
Message-ID: <CAMZfGtVYkkoQc+VsMPj-_FWAZmQOhme4QD0vJ9cDZNMsTg2jPw@mail.gmail.com> (raw)
In-Reply-To: <20201211135737.GA2443@casper.infradead.org>
On Fri, Dec 11, 2020 at 9:57 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> 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);
Thank you.
>
> > +++ 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));
>
Thanks.
--
Yours,
Muchun
next prev parent reply other threads:[~2020-12-12 1:00 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
2020-12-11 14:14 ` Muchun Song [this message]
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=CAMZfGtVYkkoQc+VsMPj-_FWAZmQOhme4QD0vJ9cDZNMsTg2jPw@mail.gmail.com \
--to=songmuchun@bytedance.com \
--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=vdavydov.dev@gmail.com \
--cc=willy@infradead.org \
/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).