* [PATCH] fix spurious EBUSY on memory cgroup removal
@ 2008-03-25 5:47 YAMAMOTO Takashi
2008-03-25 5:53 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: YAMAMOTO Takashi @ 2008-03-25 5:47 UTC (permalink / raw)
To: akpm; +Cc: balbir, containers, linux-mm, kamezawa.hiroyu, minoura
[ 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@valinux.co.jp>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
---
--- 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);
}
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] fix spurious EBUSY on memory cgroup removal
2008-03-25 5:47 [PATCH] fix spurious EBUSY on memory cgroup removal YAMAMOTO Takashi
@ 2008-03-25 5:53 ` Andrew Morton
2008-03-25 6:28 ` YAMAMOTO Takashi
2008-03-25 6:30 ` KAMEZAWA Hiroyuki
0 siblings, 2 replies; 7+ messages in thread
From: Andrew Morton @ 2008-03-25 5:53 UTC (permalink / raw)
To: YAMAMOTO Takashi; +Cc: balbir, containers, linux-mm, kamezawa.hiroyu, minoura
On Tue, 25 Mar 2008 14:47:13 +0900 (JST) yamamoto@valinux.co.jp (YAMAMOTO Takashi) wrote:
> [ resending with To: akpm. Andrew, can you include this in -mm tree? ]
Shouldn't it be in 2.6.25?
> 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@valinux.co.jp>
> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
> ---
>
> --- 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);
> }
> }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] fix spurious EBUSY on memory cgroup removal
2008-03-25 5:53 ` Andrew Morton
@ 2008-03-25 6:28 ` YAMAMOTO Takashi
2008-03-25 6:30 ` KAMEZAWA Hiroyuki
1 sibling, 0 replies; 7+ messages in thread
From: YAMAMOTO Takashi @ 2008-03-25 6:28 UTC (permalink / raw)
To: akpm; +Cc: containers, linux-mm, minoura, balbir
> On Tue, 25 Mar 2008 14:47:13 +0900 (JST) yamamoto@valinux.co.jp (YAMAMOTO Takashi) wrote:
>
> > [ 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
>
> > 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@valinux.co.jp>
> > Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
> > ---
> >
> > --- 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);
> > }
> > }
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] fix spurious EBUSY on memory cgroup removal
2008-03-25 5:53 ` Andrew Morton
2008-03-25 6:28 ` YAMAMOTO Takashi
@ 2008-03-25 6:30 ` KAMEZAWA Hiroyuki
2008-03-25 6:28 ` Balbir Singh
1 sibling, 1 reply; 7+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-03-25 6:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: YAMAMOTO Takashi, balbir, containers, linux-mm, minoura
On Mon, 24 Mar 2008 22:53:09 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 25 Mar 2008 14:47:13 +0900 (JST) yamamoto@valinux.co.jp (YAMAMOTO Takashi) wrote:
>
> > [ 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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix spurious EBUSY on memory cgroup removal
2008-03-25 6:30 ` KAMEZAWA Hiroyuki
@ 2008-03-25 6:28 ` Balbir Singh
0 siblings, 0 replies; 7+ messages in thread
From: Balbir Singh @ 2008-03-25 6:28 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Andrew Morton, YAMAMOTO Takashi, containers, linux-mm, minoura
KAMEZAWA Hiroyuki wrote:
> On Mon, 24 Mar 2008 22:53:09 -0700
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> On Tue, 25 Mar 2008 14:47:13 +0900 (JST) yamamoto@valinux.co.jp (YAMAMOTO Takashi) wrote:
>>
>>> [ 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
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] fix spurious EBUSY on memory cgroup removal
@ 2008-02-01 3:46 YAMAMOTO Takashi
2008-02-02 4:10 ` Balbir Singh
0 siblings, 1 reply; 7+ messages in thread
From: YAMAMOTO Takashi @ 2008-02-01 3:46 UTC (permalink / raw)
To: balbir; +Cc: containers, linux-mm, kamezawa.hiroyu
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@valinux.co.jp>
---
--- 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);
}
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] fix spurious EBUSY on memory cgroup removal
2008-02-01 3:46 YAMAMOTO Takashi
@ 2008-02-02 4:10 ` Balbir Singh
0 siblings, 0 replies; 7+ messages in thread
From: Balbir Singh @ 2008-02-02 4:10 UTC (permalink / raw)
To: YAMAMOTO Takashi; +Cc: containers, linux-mm
YAMAMOTO Takashi wrote:
> 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@valinux.co.jp>
> ---
>
> --- 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);
> }
> }
The difference I see with the change is that mmput() will now call
mm_free_cgroup() when mm->mm_users drop to 0 and __mmdrop() will call it when
mm->mm_count drops to 0.
I think this change makes sense
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-03-25 6:38 UTC | newest]
Thread overview: 7+ 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:53 ` Andrew Morton
2008-03-25 6:28 ` YAMAMOTO Takashi
2008-03-25 6:30 ` KAMEZAWA Hiroyuki
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-02 4:10 ` Balbir Singh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).