Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320780
b: refs/heads/master
c: 7575468
h: refs/heads/master
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Linus Torvalds committed Aug 1, 2012
1 parent 1c8e1d8 commit d79186e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 94ae8ba7176666d1e7d8bbb9f93670a27540b6a8
refs/heads/master: 75754681fe79b84dde1048470a44eeb64192fad6
6 changes: 4 additions & 2 deletions trunk/mm/hugetlb_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ int __init hugetlb_cgroup_file_init(int idx)
return 0;
}

/*
* hugetlb_lock will make sure a parallel cgroup rmdir won't happen
* when we migrate hugepages
*/
void hugetlb_cgroup_migrate(struct page *oldhpage, struct page *newhpage)
{
struct hugetlb_cgroup *h_cg;
Expand All @@ -397,13 +401,11 @@ void hugetlb_cgroup_migrate(struct page *oldhpage, struct page *newhpage)
spin_lock(&hugetlb_lock);
h_cg = hugetlb_cgroup_from_page(oldhpage);
set_hugetlb_cgroup(oldhpage, NULL);
cgroup_exclude_rmdir(&h_cg->css);

/* move the h_cg details to new cgroup */
set_hugetlb_cgroup(newhpage, h_cg);
list_move(&newhpage->lru, &h->hugepage_activelist);
spin_unlock(&hugetlb_lock);
cgroup_release_and_wakeup_rmdir(&h_cg->css);
return;
}

Expand Down

0 comments on commit d79186e

Please sign in to comment.