Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105299
b: refs/heads/master
c: b7ba30c
h: refs/heads/master
i:
  105297: 71c1e62
  105295: ee2ad89
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jul 24, 2008
1 parent f8f9e5b commit f6a5ba0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff7ea79cf7c3a481851bd4b2185fdeb6ce4afa29
refs/heads/master: b7ba30c679ed1eb7ed3ed8f281f6493282042bd4
17 changes: 11 additions & 6 deletions trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,16 @@ static int adjust_pool_surplus(int delta)
return ret;
}

static void prep_new_huge_page(struct page *page, int nid)
{
set_compound_page_dtor(page, free_huge_page);
spin_lock(&hugetlb_lock);
nr_huge_pages++;
nr_huge_pages_node[nid]++;
spin_unlock(&hugetlb_lock);
put_page(page); /* free it into the hugepage allocator */
}

static struct page *alloc_fresh_huge_page_node(int nid)
{
struct page *page;
Expand All @@ -526,12 +536,7 @@ static struct page *alloc_fresh_huge_page_node(int nid)
__free_pages(page, HUGETLB_PAGE_ORDER);
return NULL;
}
set_compound_page_dtor(page, free_huge_page);
spin_lock(&hugetlb_lock);
nr_huge_pages++;
nr_huge_pages_node[nid]++;
spin_unlock(&hugetlb_lock);
put_page(page); /* free it into the hugepage allocator */
prep_new_huge_page(page, nid);
}

return page;
Expand Down

0 comments on commit f6a5ba0

Please sign in to comment.