RE: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Ni, Xun
, 2014 10:16 AM To: Li Zefan Cc: Tejun Heo; Dongsheng Yang; cgro...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] cgroup: Introduce cgroup_detach_task(). On Tue, Aug 26, 2014 at 9:35 AM, Li Zefan wrote: > On 2014/8/25 23:00, Dongsheng Yang wrote: >> On Mon, Aug 25, 2

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
On Tue, Aug 26, 2014 at 9:35 AM, Li Zefan wrote: > On 2014/8/25 23:00, Dongsheng Yang wrote: >> On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo wrote: >>> On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: My point here is that attaching and detaching are a pair of operations. >>>

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Li Zefan
On 2014/8/25 23:00, Dongsheng Yang wrote: > On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo wrote: >> On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: >>> My point here is that attaching and detaching are a pair of operations. >> >> There is no detaching from a cgroup. A task is

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo wrote: > On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: >> My point here is that attaching and detaching are a pair of operations. > > There is no detaching from a cgroup. A task is always attached to a > cgroup whether that's a root

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Tejun Heo
On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: > My point here is that attaching and detaching are a pair of operations. There is no detaching from a cgroup. A task is always attached to a cgroup whether that's a root or non-root cgroup. Thanks. -- tejun -- To unsubscribe

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
Hi tj. On Mon, Aug 25, 2014 at 10:12 PM, Tejun Heo wrote: > On Mon, Aug 25, 2014 at 07:32:10PM +0800, Dongsheng Yang wrote: >> Currently, the only method to detach a task from a cgroup is moving >> it to others. It looks not natrual to me. > > Ummm... how is this different from moving it to the

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Tejun Heo
On Mon, Aug 25, 2014 at 07:32:10PM +0800, Dongsheng Yang wrote: > Currently, the only method to detach a task from a cgroup is moving > it to others. It looks not natrual to me. Ummm... how is this different from moving it to the root cgroup? "just because" usually isn't a good enough rationale.

[PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
Currently, the only method to detach a task from a cgroup is moving it to others. It looks not natrual to me. Inspired by cgroup_subtree_control_write(), this patch introduce allow user to at-detach a process to/from a cgroup by echo "+/-pid" to cgroup.procs. In addition, we keep the old method

[PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
Currently, the only method to detach a task from a cgroup is moving it to others. It looks not natrual to me. Inspired by cgroup_subtree_control_write(), this patch introduce allow user to at-detach a process to/from a cgroup by echo +/-pid to cgroup.procs. In addition, we keep the old method to

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Tejun Heo
On Mon, Aug 25, 2014 at 07:32:10PM +0800, Dongsheng Yang wrote: Currently, the only method to detach a task from a cgroup is moving it to others. It looks not natrual to me. Ummm... how is this different from moving it to the root cgroup? just because usually isn't a good enough rationale.

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
Hi tj. On Mon, Aug 25, 2014 at 10:12 PM, Tejun Heo t...@kernel.org wrote: On Mon, Aug 25, 2014 at 07:32:10PM +0800, Dongsheng Yang wrote: Currently, the only method to detach a task from a cgroup is moving it to others. It looks not natrual to me. Ummm... how is this different from moving it

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Tejun Heo
On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: My point here is that attaching and detaching are a pair of operations. There is no detaching from a cgroup. A task is always attached to a cgroup whether that's a root or non-root cgroup. Thanks. -- tejun -- To unsubscribe from

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo t...@kernel.org wrote: On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: My point here is that attaching and detaching are a pair of operations. There is no detaching from a cgroup. A task is always attached to a cgroup whether that's

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Li Zefan
On 2014/8/25 23:00, Dongsheng Yang wrote: On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo t...@kernel.org wrote: On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: My point here is that attaching and detaching are a pair of operations. There is no detaching from a cgroup. A task is

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Dongsheng Yang
On Tue, Aug 26, 2014 at 9:35 AM, Li Zefan lize...@huawei.com wrote: On 2014/8/25 23:00, Dongsheng Yang wrote: On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo t...@kernel.org wrote: On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: My point here is that attaching and detaching are a

RE: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Ni, Xun
, 2014 10:16 AM To: Li Zefan Cc: Tejun Heo; Dongsheng Yang; cgro...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] cgroup: Introduce cgroup_detach_task(). On Tue, Aug 26, 2014 at 9:35 AM, Li Zefan lize...@huawei.com wrote: On 2014/8/25 23:00, Dongsheng Yang wrote: On Mon, Aug