Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14619
b: refs/heads/master
c: 0bd0f9f
h: refs/heads/master
i:
  14617: 7b1ceb1
  14615: 54a47b5
v: v3
  • Loading branch information
Eric Paris authored and Linus Torvalds committed Nov 22, 2005
1 parent 2ac1f91 commit 00ec271
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ef897c71a8985b62b7ec320a37376daaad364d0
refs/heads/master: 0bd0f9fb190a0fc0fb25b764c8b04869711f7657
6 changes: 6 additions & 0 deletions trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ unsigned long max_huge_pages;
static struct list_head hugepage_freelists[MAX_NUMNODES];
static unsigned int nr_huge_pages_node[MAX_NUMNODES];
static unsigned int free_huge_pages_node[MAX_NUMNODES];

/*
* Protects updates to hugepage_freelists, nr_huge_pages, and free_huge_pages
*/
static DEFINE_SPINLOCK(hugetlb_lock);

static void enqueue_huge_page(struct page *page)
Expand Down Expand Up @@ -61,8 +65,10 @@ static struct page *alloc_fresh_huge_page(void)
HUGETLB_PAGE_ORDER);
nid = (nid + 1) % num_online_nodes();
if (page) {
spin_lock(&hugetlb_lock);
nr_huge_pages++;
nr_huge_pages_node[page_to_nid(page)]++;
spin_unlock(&hugetlb_lock);
}
return page;
}
Expand Down

0 comments on commit 00ec271

Please sign in to comment.