Re: [PATCH v9 10/11] mm/hugetlb: Gather discrete indexes of tail page
From: Oscar Salvador
Date: Wed Dec 16 2020 - 09:04:44 EST
On Sun, Dec 13, 2020 at 11:45:33PM +0800, Muchun Song wrote:
> For HugeTLB page, there are more metadata to save in the struct page.
> But the head struct page cannot meet our needs, so we have to abuse
> other tail struct page to store the metadata. In order to avoid
> conflicts caused by subsequent use of more tail struct pages, we can
> gather these discrete indexes of tail struct page. In this case, it
> will be easier to add a new tail page index later.
>
> There are only (RESERVE_VMEMMAP_SIZE / sizeof(struct page)) struct
> page structs can be used when CONFIG_HUGETLB_PAGE_FREE_VMEMMAP, so
"that can be..."
> add a BUILD_BUG_ON to catch invalid usage of the tail struct page.
>
> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
I think this makes the current situation with metadata usage in sub-pages
easier to track.
Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
--
Oscar Salvador
SUSE L3