All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix spurious EBUSY on memory cgroup removal
@ 2008-03-25  5:47 ` YAMAMOTO Takashi
  0 siblings, 0 replies; 14+ messages in thread
From: YAMAMOTO Takashi @ 2008-03-25  5:47 UTC (permalink / raw)
  To: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
  Cc: containers-qjLDD68F18O7TbgM5vRIOg,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg, minoura-jCdQPDEk3idL9jVzuh4AOg,
	balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

[ 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.

Signed-off-by: YAMAMOTO Takashi <yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
Acked-by: Balbir Singh <balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---

--- linux-2.6.24-rc8-mm1/kernel/fork.c.BACKUP	2008-01-23 14:43:29.000000000 +0900
+++ linux-2.6.24-rc8-mm1/kernel/fork.c	2008-01-31 17:26:31.000000000 +0900
@@ -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);
 	}
 }

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH] fix spurious EBUSY on memory cgroup removal
@ 2008-02-01  3:46 ` YAMAMOTO Takashi
  0 siblings, 0 replies; 14+ messages in thread
From: YAMAMOTO Takashi @ 2008-02-01  3:46 UTC (permalink / raw)
  To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  Cc: containers-qjLDD68F18O7TbgM5vRIOg,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg

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.

Signed-off-by: YAMAMOTO Takashi <yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
---

--- linux-2.6.24-rc8-mm1/kernel/fork.c.BACKUP	2008-01-23 14:43:29.000000000 +0900
+++ linux-2.6.24-rc8-mm1/kernel/fork.c	2008-01-31 17:26:31.000000000 +0900
@@ -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);
 	}
 }

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-03-25  6:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-25  5:47 [PATCH] fix spurious EBUSY on memory cgroup removal YAMAMOTO Takashi
2008-03-25  5:47 ` YAMAMOTO Takashi
     [not found] ` <20080325054713.948EF1E92EC-Pcsii4f/SVk@public.gmane.org>
2008-03-25  5:53   ` Andrew Morton
2008-03-25  5:53     ` Andrew Morton
     [not found]     ` <20080324225309.0a1ab8ec.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-03-25  6:28       ` YAMAMOTO Takashi
2008-03-25  6:28         ` YAMAMOTO Takashi
2008-03-25  6:30       ` KAMEZAWA Hiroyuki
2008-03-25  6:30         ` KAMEZAWA Hiroyuki
     [not found]         ` <20080325153020.d9179428.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-03-25  6:28           ` Balbir Singh
2008-03-25  6:28             ` Balbir Singh
  -- strict thread matches above, loose matches on Subject: below --
2008-02-01  3:46 YAMAMOTO Takashi
2008-02-01  3:46 ` YAMAMOTO Takashi
     [not found] ` <20080201034624.770651E3C10-Pcsii4f/SVk@public.gmane.org>
2008-02-02  4:10   ` Balbir Singh
2008-02-02  4:10     ` Balbir Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.