]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hugetlb/cgroup: remove exclude and wakeup rmdir calls from migrate
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sat, 21 Jul 2012 00:54:05 +0000 (10:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:02:27 +0000 (13:02 +1000)
We already hold the hugetlb_lock.  That should prevent a parallel cgroup
rmdir from touching page's hugetlb cgroup.  So remove the exclude and
wakeup calls.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb_cgroup.c

index 9834a01c79dc2217cd2dfa85d3c778f08677a6f0..a3f358fb8a0c81bcb7cca5ce7c52c29f002b4261 100644 (file)
@@ -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;
@@ -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;
 }