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]
Date:   Mon, 27 Sep 2021 17:38:00 +1300
From:   Barry Song <21cnbao@...il.com>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     Mike Kravetz <mike.kravetz@...cle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Oscar Salvador <osalvador@...e.de>,
        Michal Hocko <mhocko@...e.com>,
        Barry Song <song.bao.hua@...ilicon.com>,
        David Hildenbrand <david@...hat.com>,
        Chen Huang <chenhuang5@...wei.com>,
        "Bodeddula, Balasubramaniam" <bodeddub@...zon.com>,
        Jonathan Corbet <corbet@....net>,
        Matthew Wilcox <willy@...radead.org>,
        Xiongchun duan <duanxiongchun@...edance.com>,
        fam.zheng@...edance.com, Muchun Song <smuchun@...il.com>,
        Qi Zheng <zhengqi.arch@...edance.com>,
        linux-doc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH v4 5/5] mm: sparsemem: move vmemmap related to HugeTLB to CONFIG_HUGETLB_PAGE_FREE_VMEMMAP

On Sun, Sep 26, 2021 at 4:15 PM Muchun Song <songmuchun@...edance.com> wrote:
>
> The vmemmap_remap_free/alloc are relevant to HugeTLB, so move those
> functiongs to the scope of CONFIG_HUGETLB_PAGE_FREE_VMEMMAP.
>
> Signed-off-by: Muchun Song <songmuchun@...edance.com>

Reviewed-by: Barry Song <song.bao.hua@...ilicon.com>

> ---
>  include/linux/mm.h  | 2 ++
>  mm/sparse-vmemmap.c | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 00bb2d938df4..a706e7ffda94 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -3182,10 +3182,12 @@ static inline void print_vma_addr(char *prefix, unsigned long rip)
>  }
>  #endif
>
> +#ifdef CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
>  int vmemmap_remap_free(unsigned long start, unsigned long end,
>                        unsigned long reuse);
>  int vmemmap_remap_alloc(unsigned long start, unsigned long end,
>                         unsigned long reuse, gfp_t gfp_mask);
> +#endif
>
>  void *sparse_buffer_alloc(unsigned long size);
>  struct page * __populate_section_memmap(unsigned long pfn,
> diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
> index d486a7a48512..3c7dd41c3164 100644
> --- a/mm/sparse-vmemmap.c
> +++ b/mm/sparse-vmemmap.c
> @@ -34,6 +34,7 @@
>  #include <asm/pgalloc.h>
>  #include <asm/tlbflush.h>
>
> +#ifdef CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
>  /**
>   * struct vmemmap_remap_walk - walk vmemmap page table
>   *
> @@ -423,6 +424,7 @@ int vmemmap_remap_alloc(unsigned long start, unsigned long end,
>
>         return 0;
>  }
> +#endif /* CONFIG_HUGETLB_PAGE_FREE_VMEMMAP */
>
>  /*
>   * Allocate a block of memory to be used to back the virtual memory map
> --
> 2.11.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ