Re: [PATCH 1/2] mm: thp: cleanup: mv alloc_hugepage to better place

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

 



(2013/09/02 12:45), Bob Liu wrote:
> Move alloc_hugepage to better place, no need for a seperate #ifndef CONFIG_NUMA
> 
> Signed-off-by: Bob Liu <bob.liu@xxxxxxxxxx>
> ---

Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx>

Thanks,
Yasuaki Ishimatsu

>   mm/huge_memory.c |   14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index a92012a..7448cf9 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -753,14 +753,6 @@ static inline struct page *alloc_hugepage_vma(int defrag,
>   			       HPAGE_PMD_ORDER, vma, haddr, nd);
>   }
>   
> -#ifndef CONFIG_NUMA
> -static inline struct page *alloc_hugepage(int defrag)
> -{
> -	return alloc_pages(alloc_hugepage_gfpmask(defrag, 0),
> -			   HPAGE_PMD_ORDER);
> -}
> -#endif
> -
>   static bool set_huge_zero_page(pgtable_t pgtable, struct mm_struct *mm,
>   		struct vm_area_struct *vma, unsigned long haddr, pmd_t *pmd,
>   		struct page *zero_page)
> @@ -2204,6 +2196,12 @@ static struct page
>   	return *hpage;
>   }
>   #else
> +static inline struct page *alloc_hugepage(int defrag)
> +{
> +	return alloc_pages(alloc_hugepage_gfpmask(defrag, 0),
> +			   HPAGE_PMD_ORDER);
> +}
> +
>   static struct page *khugepaged_alloc_hugepage(bool *wait)
>   {
>   	struct page *hpage;
> 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




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