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 ?

-aneesh

Reply via email to