[PATCH v3 1/3] mm/hugetlb: Allow arch to override and call the weak function

Michal Hocko mhocko at kernel.org
Fri Jul 28 17:06:12 AEST 2017


On Thu 27-07-17 21:50:35, Aneesh Kumar K.V wrote:
> 
> 
> On 07/27/2017 06:31 PM, Michal Hocko wrote:
> >On Thu 27-07-17 11:48:26, Aneesh Kumar K.V wrote:
> >>For ppc64, we want to call this function when we are not running as guest.
> >
> >What does this mean?
> >
> 
> ppc64 guest (aka LPAR) support a different mechanism for hugetlb
> allocation/reservation. The LPAR management application called HMC can be
> used to reserve a set of hugepages and we pass the details of reserved pages
> via device tree to the guest. You can find the details in
> htab_dt_scan_hugepage_blocks() . We do the memblock_reserve of the range and
> later in the boot sequence, we just add the reserved range to
> huge_boot_pages.
> 
> For baremetal config (when we are not running as guest) we want to follow
> what other architecture does, that is look at the command line and do
> memblock allocation. Hence the need to call generic function
> __alloc_bootmem_huge_page() in that case.
> 
> I can add all these details in to the commit message if that makes it easy ?

It certainly helped me to understand the context much better. Thanks! As
you are patching a generic code this would be appropriate IMHO.
-- 
Michal Hocko
SUSE Labs


More information about the Linuxppc-dev mailing list