Skip to contentSkip to conversation

fix spurious EBUSY on memory cgroup removal

PATCH In review YAMAMOTO Takashi 4 participants 5 messages Mar 25, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix spurious EBUSY on memory cgroup removal

[ resending with To: akpm. Andrew, can you include this in -mm tree? ]

hi,

the following patch is to fix spurious EBUSY on cgroup removal.

YAMAMOTO Takashi

call mm_free_cgroup earlier.
otherwise a reference due to lazy mm switching can prevent cgroup removal.

---

kernel/fork.c renamed from kernel/fork.c.BACKUP +1 -1
@@ -393,7 +393,6 @@ void __mmdrop(struct mm_struct *mm)
 {
 	BUG_ON(mm == &init_mm);
 	mm_free_pgd(mm);
-	mm_free_cgroup(mm);
 	destroy_context(mm);
 	free_mm(mm);
 }
@@ -415,6 +414,7 @@ void mmput(struct mm_struct *mm)
 			spin_unlock(&mmlist_lock);
 		}
 		put_swap_token(mm);
+		mm_free_cgroup(mm);
 		mmdrop(mm);
 	}
 }
maintainer
#1 lore raw
Quoted 1 line · On Tue, 25 Mar 2008 14:47:13 +0900 (JST)…

[ resending with To: akpm. Andrew, can you include this in -mm tree? ]

Shouldn't it be in 2.6.25?

Quoted 32 lines

hi,

the following patch is to fix spurious EBUSY on cgroup removal.

YAMAMOTO Takashi

call mm_free_cgroup earlier.
otherwise a reference due to lazy mm switching can prevent cgroup removal.

---

kernel/fork.c renamed from kernel/fork.c.BACKUP +1 -1
@@ -393,7 +393,6 @@ void __mmdrop(struct mm_struct *mm)
 {
 	BUG_ON(mm == &init_mm);
 	mm_free_pgd(mm);
-	mm_free_cgroup(mm);
 	destroy_context(mm);
 	free_mm(mm);
 }
@@ -415,6 +414,7 @@ void mmput(struct mm_struct *mm)
 			spin_unlock(&mmlist_lock);
 		}
 		put_swap_token(mm);
+		mm_free_cgroup(mm);
 		mmdrop(mm);
 	}
 }
#2 lore raw
Quoted 6 lines · On Mon, 24 Mar 2008 22:53:09 -0700 Andrew Morton…
Quoted 1 line · On Tue, 25 Mar 2008 14:47:13 +0900 (JST)…

[ resending with To: akpm. Andrew, can you include this in -mm tree? ]

Shouldn't it be in 2.6.25?

I think this should be.

Thanks,
-Kame

#3 lore raw
Quoted 5 lines · KAMEZAWA Hiroyuki
Quoted 2 lines · On Mon, 24 Mar 2008 22:53:09 -0700 Andrew Morton…

On Tue, 25 Mar 2008 14:47:13 +0900 (JST) [email protected] (YAMAMOTO Takashi) wrote:

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

[ resending with To: akpm. Andrew, can you include this in -mm tree? ]

Shouldn't it be in 2.6.25?

I think this should be.

Thanks,
-Kame

Me too

Signature · 4 lines
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
#4 lore raw
In reply to Andrew Morton
Quoted 5 lines · On Tue, 25 Mar 2008 14:47:13 +0900 (JST)…
Quoted 2 lines

[ resending with To: akpm. Andrew, can you include this in -mm tree? ]

Shouldn't it be in 2.6.25?

yes, probably.

(i'm not sure about linux development model.)

YAMAMOTO Takashi

Quoted 37 lines
Quoted 26 lines

hi,

the following patch is to fix spurious EBUSY on cgroup removal.

YAMAMOTO Takashi

call mm_free_cgroup earlier.
otherwise a reference due to lazy mm switching can prevent cgroup removal.

---

kernel/fork.c renamed from kernel/fork.c.BACKUP +0 -1
@@ -393,7 +393,6 @@ void __mmdrop(struct mm_struct *mm)
 {
 	BUG_ON(mm == &init_mm);
 	mm_free_pgd(mm);
-	mm_free_cgroup(mm);
 	destroy_context(mm);
 	free_mm(mm);
 }

kernel/fork.c void mmput(struct mm_struct *mm) · line 420

Quoted 7 lines
kernel/fork.c renamed from kernel/fork.c.BACKUP +1 -0
@@ -415,6 +414,7 @@ void mmput(struct mm_struct *mm)
 			spin_unlock(&mmlist_lock);
 		}
 		put_swap_token(mm);
+		mm_free_cgroup(mm);
 		mmdrop(mm);
 	}
 }

_______________________________________________
Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers