Re: [PATCH v2 1/4] hugetlb: add demote hugetlb page sysfs interfaces

From: Mike Kravetz
Date: Wed Sep 29 2021 - 14:23:46 EST


On 9/24/21 12:08 AM, Aneesh Kumar K.V wrote:
> Mike Kravetz <mike.kravetz@xxxxxxxxxx> writes:
>
>> Two new sysfs files are added to demote hugtlb pages. These files are
>> both per-hugetlb page size and per node. Files are:
>> demote_size - The size in Kb that pages are demoted to. (read-write)
>> demote - The number of huge pages to demote. (write-only)
>>
>> By default, demote_size is the next smallest huge page size. Valid huge
>> page sizes less than huge page size may be written to this file. When
>> huge pages are demoted, they are demoted to this size.
>>
>> Writing a value to demote will result in an attempt to demote that
>> number of hugetlb pages to an appropriate number of demote_size pages.
>>
>> NOTE: Demote interfaces are only provided for huge page sizes if there
>> is a smaller target demote huge page size. For example, on x86 1GB huge
>> pages will have demote interfaces. 2MB huge pages will not have demote
>> interfaces.
>
> Should we also check if the platform allows for
> gigantic_page_runtime_supported() ?
>

Yes, thanks!

Looks like this may only be an issue for giganitc pages on power managed
by firmware. Still, needs to be checked. Will update.

Thanks,
--
Mike Kravetz