Re: [PATCH 4/4] mm: hugetlb_vmemmap: convert page to folio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/27/23 16:46, Muchun Song wrote:
> There is still some places where it does not be converted to folio,
> this patch convert all of them to folio. And this patch also does
> some trival cleanup to fix the code style problems.
> 
> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
> ---
>  mm/hugetlb_vmemmap.c | 51 ++++++++++++++++++++++----------------------
>  1 file changed, 25 insertions(+), 26 deletions(-)
...
> @@ -535,9 +535,9 @@ long hugetlb_vmemmap_restore_folios(const struct hstate *h,
>  }
>  
>  /* Return true iff a HugeTLB whose vmemmap should and can be optimized. */
> -static bool vmemmap_should_optimize(const struct hstate *h, const struct page *head)
> +static bool vmemmap_should_optimize_folio(const struct hstate *h, struct folio *folio)
>  {
> -	if (HPageVmemmapOptimized((struct page *)head))
> +	if (folio_test_hugetlb_vmemmap_optimized(folio))

Nice!  After this, there is only one remaining use of 'page based'
hugetlb specific flag macros.

	mm/memory_hotplug.c:            if (HPageMigratable(head))

When that is converted, all those macros can be removed from linux/hugetlb.h

Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
-- 
Mike Kravetz




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux