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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHbLzkq7XVfUqS7ajVcNhWPWYxg9HKcnveOzACAorZwY3uPQBA@mail.gmail.com>
Date:   Thu, 17 Oct 2019 10:38:37 -0700
From:   Yang Shi <shy828301@...il.com>
To:     Song Liu <songliubraving@...com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux MM <linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        matthew.wilcox@...cle.com, kernel-team@...com,
        william.kucharski@...cle.com,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH v2 2/5] mm/thp: fix node page state in split_huge_page_to_list()

On Thu, Oct 17, 2019 at 9:42 AM Song Liu <songliubraving@...com> wrote:
>
> From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
>
> Make sure split_huge_page_to_list() handle the state of shmem THP and
> file THP properly.
>
> Fixes: 60fbf0ab5da1 ("mm,thp: stats for file backed THP")
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Tested-by: Song Liu <songliubraving@...com>
> Signed-off-by: Song Liu <songliubraving@...com>

Acked-by: Yang Shi <yang.shi@...ux.alibaba.com>

> ---
>  mm/huge_memory.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index c5cb6dcd6c69..13cc93785006 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2789,8 +2789,13 @@ int split_huge_page_to_list(struct page *page, struct list_head *list)
>                         ds_queue->split_queue_len--;
>                         list_del(page_deferred_list(head));
>                 }
> -               if (mapping)
> -                       __dec_node_page_state(page, NR_SHMEM_THPS);
> +               if (mapping) {
> +                       if (PageSwapBacked(page))
> +                               __dec_node_page_state(page, NR_SHMEM_THPS);
> +                       else
> +                               __dec_node_page_state(page, NR_FILE_THPS);
> +               }
> +
>                 spin_unlock(&ds_queue->split_queue_lock);
>                 __split_huge_page(page, list, end, flags);
>                 if (PageSwapCache(head)) {
> --
> 2.17.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ