Re: [PATCH 3/8] hugetlb: rename hugepage allocation functions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Wu Fengguang
Date: Tuesday, August 24, 2010 - 6:21 pm

On Wed, Aug 25, 2010 at 07:55:22AM +0800, Naoya Horiguchi wrote:

alloc_buddy_huge_page() doesn't make use of @vma at all, so the
parameters can be removed.

It looks cleaner to fold the
alloc_huge_page_no_vma_node=>alloc_huge_page_node renames into the
previous patch, from there split out the code refactor chunks into
a standalone patch, and then include this cleanup patch.

Thanks,
Fengguang
---
hugetlb: remove unused alloc_buddy_huge_page() parameters

alloc_buddy_huge_page() doesn't make use of @vma at all, so the
parameters can be removed.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index cc5be78..3114b4c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -770,8 +770,7 @@ static int free_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed,
 	return ret;
 }
 
-static struct page *alloc_buddy_huge_page(struct hstate *h,
-			struct vm_area_struct *vma, unsigned long address)
+static struct page *alloc_buddy_huge_page(struct hstate *h)
 {
 	struct page *page;
 	unsigned int nid;
@@ -871,7 +870,7 @@ static int gather_surplus_pages(struct hstate *h, int delta)
 retry:
 	spin_unlock(&hugetlb_lock);
 	for (i = 0; i < needed; i++) {
-		page = alloc_buddy_huge_page(h, NULL, 0);
+		page = alloc_buddy_huge_page(h);
 		if (!page) {
 			/*
 			 * We were not able to allocate enough pages to
@@ -1052,7 +1051,7 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma,
 	spin_unlock(&hugetlb_lock);
 
 	if (!page) {
-		page = alloc_buddy_huge_page(h, vma, addr);
+		page = alloc_buddy_huge_page(h);
 		if (!page) {
 			hugetlb_put_quota(inode->i_mapping, chg);
 			return ERR_PTR(-VM_FAULT_SIGBUS);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/8] Hugepage migration (v3), Naoya Horiguchi, (Tue Aug 24, 4:55 pm)
[PATCH 3/8] hugetlb: rename hugepage allocation functions, Naoya Horiguchi, (Tue Aug 24, 4:55 pm)
[PATCH 4/8] hugetlb: redefine hugepage copy functions, Naoya Horiguchi, (Tue Aug 24, 4:55 pm)
[PATCH 5/8] hugetlb: hugepage migration core, Naoya Horiguchi, (Tue Aug 24, 4:55 pm)
[PATCH 6/8] HWPOISON, hugetlb: soft offlining for hugepage, Naoya Horiguchi, (Tue Aug 24, 4:55 pm)
[PATCH 7/8] HWPOISON, hugetlb: fix unpoison for hugepage, Naoya Horiguchi, (Tue Aug 24, 4:55 pm)
[PATCH 8/8] page-types.c: fix name of unpoison interface, Naoya Horiguchi, (Tue Aug 24, 4:55 pm)
Re: [PATCH 3/8] hugetlb: rename hugepage allocation functions, Wu Fengguang, (Tue Aug 24, 6:21 pm)
Re: [PATCH 7/8] HWPOISON, hugetlb: fix unpoison for hugepage, Naoya Horiguchi, (Thu Aug 26, 1:26 am)