lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMZfGtVYkkoQc+VsMPj-_FWAZmQOhme4QD0vJ9cDZNMsTg2jPw@mail.gmail.com>
Date:   Fri, 11 Dec 2020 22:14:22 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Hugh Dickins <hughd@...gle.com>,
        Shakeel Butt <shakeelb@...gle.com>,
        Roman Gushchin <guro@...com>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        Feng Tang <feng.tang@...el.com>, Neil Brown <neilb@...e.de>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Randy Dunlap <rdunlap@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        Cgroups <cgroups@...r.kernel.org>
Subject: Re: [External] Re: [PATCH v4 3/7] mm: memcontrol: convert
 NR_FILE_THPS account to pages

On Fri, Dec 11, 2020 at 9:57 PM Matthew Wilcox <willy@...radead.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ