Re: [PATCH v6 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

Aneesh Kumar K.V
2019-03-15T02:57:35Z

On 3/14/19 7:22 PM, Alexandre Ghiti wrote:
>
>
> On 03/14/2019 02:17 PM, Aneesh Kumar K.V wrote:
>> On 3/14/19 5:13 PM, Alexandre Ghiti wrote:
>>> On 03/14/2019 06:52 AM, Aneesh Kumar K.V wrote:
>>>> Alexandre Ghiti <alex@ghiti.fr> writes:
>>>>
>>
>>> Thanks for noticing Aneesh.
>>>
>>> I can't find a better solution than bringing back
>>> gigantic_page_supported check,
>>> since it is must be done at runtime in your case.
>>> I'm not sure of one thing though: you say that freeing boottime
>>> gigantic pages
>>> is not needed, but is it forbidden ? Just to know where the check and
>>> what its
>>> new name should be.
>
> You did not answer this question: is freeing boottime gigantic pages
> "forbidden" or just
> not needed ?

IMHO if we don't allow runtime allocation of gigantic hugepage, we
should not allow runtime free of gigantic hugepage. Now w.r.t ppc64,
hypervisor pass hints about the gignatic hugepages via device tree
nodes. Early in boot we mark these pages as reserved and during hugetlb
init we use these reserved pages for backing hugetlb fs.

Now "forbidden" is not the exact reason. We don't have code to put it
back in the reserved list. Hence I would say "not supported".

-aneesh