Re: [PATCH 0/3] Hugetlbfs support for riscv

Mike Kravetz
2019-01-15T19:25:34Z

On 1/15/19 8:04 AM, Christoph Hellwig wrote:
> On Wed, Jan 09, 2019 at 11:23:22AM -0800, Mike Kravetz wrote:
>>> CMA or (MEMORY_ISOLATION && COMPACTION) must be enabled so that boot
>>> reserved gigantic pages can be freed: indeed, one can reduce the number
>>> of huge pages by calling free_gigantic_pages which in turn calls
>>> free_contig_range, defined only with those configs defined.
>>> However I don't see any strong dependency between free_contig_range
>>> and those configs, maybe we could allow hugetlbfs users to free boot
>>> reserved hugepages without those configs activated, I will propose
>>> something if Mike Kravetz agrees.
>>
>> Yes, that should be modified. I think it would be a simple matter of moving
>> free_contig_range out of that ifdef block. If you would like, I can submit
>> a patch for that.
>
> We should probably include that patch in this series.

I would actually prefer that this be a separate patch. Why?
- The functionality is arch independent and not specific to riscv.
- This functionality was intended in commit 944d9fec8d7a ("hugetlb:
add support for gigantic page allocation at runtime"). However,
there was no need to tie the functionality to CMA or (MEMORY_ISOLATION
&& COMPACTION).

I don't care enough to insist the patch be separate. Just seems like
it should be separate to me.
--
Mike Kravetz