Re: [PATCH] mm, x86: no zeroing of hugetlbfs pages at boot

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

 



On Wed 06-03-13 15:50:20, Cliff Wickman wrote:
[...]
> I propose passing a flag to the early allocator to indicate that no zeroing
> of a page should be done.  The 'no zeroing' flag would have to be passed
> down this code path:
> 
>   hugetlb_hstate_alloc_pages
>     alloc_bootmem_huge_page
>       __alloc_bootmem_node_nopanic NO_ZERO  (nobootmem.c)
>         __alloc_memory_core_early  NO_ZERO
> 	  if (!(flags & NO_ZERO))
>             memset(ptr, 0, size);
> 
> Or this path if CONFIG_NO_BOOTMEM is not set:
> 
>   hugetlb_hstate_alloc_pages
>     alloc_bootmem_huge_page
>       __alloc_bootmem_node_nopanic  NO_ZERO  (bootmem.c)
>         alloc_bootmem_core          NO_ZERO
> 	  if (!(flags & NO_ZERO))
>             memset(region, 0, size);
>         __alloc_bootmem_nopanic     NO_ZERO
>           ___alloc_bootmem_nopanic  NO_ZERO
>             alloc_bootmem_core      NO_ZERO
> 	      if (!(flags & NO_ZERO))
>                 memset(region, 0, size);

Yes, the patch makes sense. I just think it make unnecessary churn.
Can we just add __alloc_bootmem_node_nopanic_nozero and hide the flag
downwards the call chain so that we do not have to touch all
__alloc_bootmem_node_nopanic callers?

Thanks

> Signed-off-by: Cliff Wickman <cpw@xxxxxxx>
> 
> ---
>  arch/x86/kernel/setup_percpu.c |    4 ++--
>  include/linux/bootmem.h        |   23 ++++++++++++++++-------
>  mm/bootmem.c                   |   12 +++++++-----
>  mm/hugetlb.c                   |    3 ++-
>  mm/nobootmem.c                 |   41 +++++++++++++++++++++++------------------
>  mm/page_cgroup.c               |    2 +-
>  mm/sparse.c                    |    2 +-
>  7 files changed, 52 insertions(+), 35 deletions(-)
> 
[...]
-- 
Michal Hocko
SUSE Labs

--
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]