OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] fix spurious EBUSY on memory cgroup removal
[PATCH] fix spurious EBUSY on memory cgroup removal [message #28606] Tue, 25 March 2008 05:47 Go to next message
yamamoto is currently offline  yamamoto
Messages: 97
Registered: July 2007
Member
[ 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);
 	}
 }
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] fix spurious EBUSY on memory cgroup removal [message #28607 is a reply to message #28606] Tue, 25 March 2008 05:53 Go to previous messageGo to next message
akpm is currently offline  akpm
Messages: 224
Registered: March 2007
Senior Member
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);
>  	}
>  }
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] fix spurious EBUSY on memory cgroup removal [message #28608 is a reply to message #28607] Tue, 25 March 2008 06:28 Go to previous messageGo to next message
yamamoto is currently offline  yamamoto
Messages: 97
Registered: July 2007
Member
> 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
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] fix spurious EBUSY on memory cgroup removal [message #28609 is a reply to message #28607] Tue, 25 March 2008 06:30 Go to previous message
KAMEZAWA Hiroyuki is currently offline  KAMEZAWA Hiroyuki
Messages: 463
Registered: September 2006
Senior Member
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

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] fix spurious EBUSY on memory cgroup removal [message #28610 is a reply to message #28609] Tue, 25 March 2008 06:28 Go to previous message
Balbir Singh is currently offline  Balbir Singh
Messages: 491
Registered: August 2006
Senior Member
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
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH 0/11 net-2.6.26] UDP/ICMP/TCP for a namespace
Next Topic: [PATCH 2/2 net-2.6.26] [NETNS]: Compilation warnings under CONFIG_NET_NS.
Goto Forum:
  


Current Time: Fri Aug 16 13:29:54 GMT 2024

Total time taken to generate the page: 0.02919 seconds