Skip to contentSkip to conversation

mm/hugetlb: Remove unnecessary VM_BUG_ON_PAGE on putback_active_hugepage()

PATCH Applied Miaohe Lin 3 participants 3 messages Feb 9, 2021 – Feb 11, 2021

Subsystems (2)
lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH v2 1/1 mm/hugetlb: Remove unnecessary VM_BUG_ON_PAGE on putback_active_hugepage()

All callers know they are operating on a hugetlb head page. So this VM_BUG_ON_PAGE can not catch anything useful.

---
 mm/hugetlb.c | 1 -
 1 file changed, 1 deletion(-)
mm/hugetlb.c +0 -1
index 06719fdf9fd6..cfa06fd1b8d7 100644
@@ -5577,7 +5577,6 @@ bool isolate_huge_page(struct page *page, struct list_head *list)
 
 void putback_active_hugepage(struct page *page)
 {
-	VM_BUG_ON_PAGE(!PageHead(page), page);
 	spin_lock(&hugetlb_lock);
 	SetHPageMigratable(page);
 	list_move_tail(&page->lru, &(page_hstate(page))->hugepage_activelist);
Signature · 1 line
2.19.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · Miaohe Lin

All callers know they are operating on a hugetlb head page. So this VM_BUG_ON_PAGE can not catch anything useful.

---
 mm/hugetlb.c | 1 -
 1 file changed, 1 deletion(-)

Thanks,

Signature · 1 line
Mike Kravetz
Quoted 14 lines
mm/hugetlb.c +0 -1
index 06719fdf9fd6..cfa06fd1b8d7 100644
@@ -5577,7 +5577,6 @@ bool isolate_huge_page(struct page *page, struct list_head *list)
 
 void putback_active_hugepage(struct page *page)
 {
-	VM_BUG_ON_PAGE(!PageHead(page), page);
 	spin_lock(&hugetlb_lock);
 	SetHPageMigratable(page);
 	list_move_tail(&page->lru, &(page_hstate(page))->hugepage_activelist);
maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Miaohe Lin
Quoted 4 lines · Miaohe Lin

All callers know they are operating on a hugetlb head page. So this VM_BUG_ON_PAGE can not catch anything useful.

Quoted 20 lines
---
 mm/hugetlb.c | 1 -
 1 file changed, 1 deletion(-)
mm/hugetlb.c +0 -1
index 06719fdf9fd6..cfa06fd1b8d7 100644
@@ -5577,7 +5577,6 @@ bool isolate_huge_page(struct page *page, struct list_head *list)
 
 void putback_active_hugepage(struct page *page)
 {
-	VM_BUG_ON_PAGE(!PageHead(page), page);
 	spin_lock(&hugetlb_lock);
 	SetHPageMigratable(page);
 	list_move_tail(&page->lru, &(page_hstate(page))->hugepage_activelist);
Signature · 1 line
2.19.1
Signature · 2 lines
Oscar Salvador
SUSE L3