Thread (34 messages) 34 messages, 4 authors, 2020-12-22

Re: [PATCH v10 09/11] mm/hugetlb: Introduce nr_free_vmemmap_pages in the struct hstate

From: Oscar Salvador <osalvador@suse.de>
Date: 2020-12-21 08:18:12
Also in: linux-fsdevel, linux-mm, lkml

On Thu, Dec 17, 2020 at 08:13:01PM +0800, Muchun Song wrote:
quoted hunk ↗ jump to hunk
@@ -182,6 +184,12 @@ bool hugetlb_free_vmemmap_enabled;
 
 static int __init early_hugetlb_free_vmemmap_param(char *buf)
 {
+	/* We cannot optimize if a "struct page" crosses page boundaries. */
+	if ((!is_power_of_2(sizeof(struct page)))) {
+		pr_warn("cannot free vmemmap pages because \"struct page\" crosses page boundaries\n");
+		return 0;
+	}
Unless there is a strong reason behind, I would move this to the previous patch,
where early_hugetlb_free_vmemmap_param is introduced.

-- 
Oscar Salvador
SUSE L3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help