lkml.org 
[lkml]   [2023]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 01/11] hugetlb: set hugetlb page flag before optimizing vmemmap
On Tue, Sep 05, 2023 at 02:44:00PM -0700, Mike Kravetz wrote:
> @@ -456,6 +457,7 @@ int hugetlb_vmemmap_restore(const struct hstate *h, struct page *head)
> unsigned long vmemmap_start = (unsigned long)head, vmemmap_end;
> unsigned long vmemmap_reuse;
>
> + VM_WARN_ON_ONCE(!PageHuge(head));
> if (!HPageVmemmapOptimized(head))
> return 0;
>
> @@ -550,6 +552,7 @@ void hugetlb_vmemmap_optimize(const struct hstate *h, struct page *head)
> unsigned long vmemmap_start = (unsigned long)head, vmemmap_end;
> unsigned long vmemmap_reuse;
>
> + VM_WARN_ON_ONCE(!PageHuge(head));
> if (!vmemmap_should_optimize(h, head))
> return;

Someone who's looking for an easy patch or three should convert both
of these functions to take a folio instead of a page. All callers
pass &folio->page. Obviously do that work on top of Mike's patch set
to avoid creating more work for him.

\
 
 \ /
  Last update: 2023-09-06 02:49    [W:0.191 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site