Re: [PATCH v17 2/9] mm: hugetlb: introduce a new config HUGETLB_PAGE_FREE_VMEMMAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 25, 2021 at 09:21:23PM +0800, Muchun Song wrote:
> The option HUGETLB_PAGE_FREE_VMEMMAP allows for the freeing of
> some vmemmap pages associated with pre-allocated HugeTLB pages.
> For example, on X86_64 6 vmemmap pages of size 4KB each can be
> saved for each 2MB HugeTLB page. 4094 vmemmap pages of size 4KB
> each can be saved for each 1GB HugeTLB page.
> 
> When a HugeTLB page is allocated or freed, the vmemmap array
> representing the range associated with the page will need to be
> remapped. When a page is allocated, vmemmap pages are freed
> after remapping. When a page is freed, previously discarded
> vmemmap pages must be allocated before remapping.
> 
> The config option is introduced early so that supporting code
> can be written to depend on the option. The initial version of
> the code only provides support for x86-64.
> 
> Like other code which frees vmemmap, this config option depends on
> HAVE_BOOTMEM_INFO_NODE. The routine register_page_bootmem_info() is
> used to register bootmem info. Therefore, make sure
> register_page_bootmem_info is enabled if HUGETLB_PAGE_FREE_VMEMMAP
> is defined.
> 
> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
> Acked-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
> Reviewed-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
> ---

Reviewed-by: Balbir Singh <bsingharora@xxxxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux