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

From: Naoya Horiguchi
Date: Thu Aug 26 2010 - 04:28:34 EST


On Wed, Aug 25, 2010 at 09:21:31AM +0800, Wu Fengguang wrote:
> On Wed, Aug 25, 2010 at 07:55:22AM +0800, Naoya Horiguchi wrote:
> > The function name alloc_huge_page_no_vma_node() has verbose suffix "_no_vma".
> > This patch makes existing alloc_huge_page() and it's family have "_vma" instead,
> > which makes it easier to read.
> >
...
> > @@ -919,7 +919,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_vma(h, NULL, 0);
>
> alloc_buddy_huge_page() doesn't make use of @vma at all, so the
> parameters can be removed.

OK.

> 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.

When we unify alloc_buddy_huge_page() as commented for patch 2/8,
_vma suffix is not necessary any more. Your suggestion to drop
unused arguments sounds reasonable,
so I merge the attached patch into patch 2/8.

Thanks,
Naoya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/